[Rd] Namespace File

Fabio Mathias Corrêa fabio.ufla at yahoo.com.br
Wed Dec 15 03:30:18 CET 2010

Dear Colleagues,

I am developing a library. However I am having the following problem with the 

My file contains:

useDynLib(Bayesthres, vuA)




My function is:

Avuall <- function(Zz, Dd, A, Vu, FL)
    m <- dim(A)[1]
    n <- dim(A)[2]
    tc <- length(Vu)
    ifc <- unlist(lapply(FL$fl, function(x) length(levels(x))))
    il <-  1
    ic <- ifc[1]
    for(i in 2:tc){
      ic[i] <- ifc[i]+ic[i-1]
      il[i] <- ic[i]-ifc[i]+1
    storage.mode(A) <- "double"
    Aux <- .Fortran("vuA", as.double(Vu), A=A, as.integer(ic), as.integer(il), 

    as.integer(n), as.integer(tc), PACKAGE="Bayesthres")$A
    V <- rbind(Zz, cbind(Dd,Aux))

The vuA file was written in Fortran95. It's within the src directory.

However the following error appears in R CMD check

Error in .Fortran("vuA", as.double(Vu), A = A, as.integer(ic), as.integer(il),  

name simbol in Fortran "vua" not is in DLL library "Bayesthres"
Error : unable to load R code in package 'Bayesthres'
ERROR: lazy loading failed for package ‘Bayesthres’

Where can I be wrong?

Thank you very much!

              Fábio Mathias Corrêa
         Departamento de Estatística
   Universidade Estadual de Santa Cruz

More information about the R-devel mailing list