[R-pkg-devel] Imported function cannot be found.
    Dirk Eddelbuettel 
    edd @end|ng |rom deb|@n@org
       
    Fri Jan 18 02:50:38 CET 2019
    
    
  
On 18 January 2019 at 11:59, Rolf Turner wrote:
| 
| I am build a package in which there is a function which calls upon the 
| function brm() from the brms package.
| 
| In my DESCRIPTION file I have the line
| 
| > Imports: lme4, brms, glmmTMB, MASS, lattice, Rcpp, rmutil
| 
| In my NAMESPACE file I have the line
| 
| > importFrom("Rcpp","cpp_object_initializer")
| 
| Yet when I call the function from my package which calls brm() I get the 
| error message:
| 
| > Error in cpp_object_initializer(.self, .refClassDef, ...) : 
| >   could not find function "cpp_object_initializer"
| 
| Clearly I am doing something wrong.  Can someone please point me in the 
| direction of correctness?
| 
| Note that there is indeed a function cpp_object_initializer() in the 
| Rcpp package.
| 
| If more detail is required in order for guidance to be provided I am of 
| course more than happy to supply such detail.
Which of these packages uses Rcpp Modules?  Yours?  brms::brm()
It may be more prudent replace
   importFrom("Rcpp","cpp_object_initializer")
with
   import(Rcpp)
which tickles a different initialization for Rcpp. I just checked two Rcpp
Modules using packages of mine, and they use that latter approach.
Hth, Dirk
-- 
http://dirk.eddelbuettel.com | @eddelbuettel | edd using debian.org
    
    
More information about the R-package-devel
mailing list