[R-pkg-devel] Imported function cannot be found.

Rolf Turner r@turner @end|ng |rom @uck|@nd@@c@nz
Thu Jan 17 23:59:24 CET 2019


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.

cheers,

Rolf Turner

-- 
Honorary Research Fellow
Department of Statistics
University of Auckland
Phone: +64-9-373-7599 ext. 88276



More information about the R-package-devel mailing list