From fabio.ufla at yahoo.com.br  Wed Dec 15 03:30:18 2010
From: fabio.ufla at yahoo.com.br (=?utf-8?B?RmFiaW8gTWF0aGlhcyBDb3Jyw6ph?=)
Date: Tue, 14 Dec 2010 18:30:18 -0800 (PST)
Subject: [Rd] Namespace File
Message-ID: <592815.53322.qm@web59709.mail.ac4.yahoo.com>

Dear Colleagues,

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

My file contains:

useDynLib(Bayesthres, vuA)

export(Bayesthres, 
    random.effects, 
    fixed.effects,
    )

exportClasses("Bayesthres")

 


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(m), 

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


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






[Rd] Namespace File
=?utf-8?B?RmFiaW8gTWF0aGlhcyBDb3Jyw6ph?=