Karl Sherwin Karl Sherwin - 6 months ago 65
R Question

Rcpp Rcpp.package.skeleton("mypackage") "rcpp_hello_world" not available for .Call() for package "mypackage"

I've managed to get the

to INSTALL in Windows by the following commands at the R prompt -

system("R CMD build mypackage")
system("R CMD INSTALL mypackage")

This creates the
. However when I do the following commands -

rcpp_hello_world <- function(){ .Call( "rcpp_hello_world", PACKAGE = "mypackage")}

I get the following error:

Error in .Call("rcpp_hello_world", PACKAGE = "mypackage") :
"rcpp_hello_world" not available for .Call() for package "mypackage"

I run
and I get the following:

attached base packages:
[1] tools stats graphics grDevices utils datasets methods base

other attached packages:
[1] mypackage_1.0 inline_0.3.13 Rcpp_0.11.1

Stating that my new mypackage is there.

Are there any further checks I can do to see what is happening? Any ideas?

Answer Source

The name of the function in RcppExports.cpp is mypackage_rcpp_hello_world(). I previously missed the preceeding mypackage_.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download