-
Notifications
You must be signed in to change notification settings - Fork 282
Description
In developing the RTM package, I had to change the package name from PEcAn.rtm to PEcAnrtm (no period) to allow it to compile. The issue is that when Rcpp compiles its libraries for export to the package namespace, it labels them as PACKAGENAME_function(...), but since it's C code, it doesn't accept PACKAGENAMEs with periods in them (namely, PEcAn.rtm)
Rcpp is incredible for code optimization because the resulting C++ code is very R-like (rnorm/dnorm calls, vectorization, apply functions etc.), but still blazingly fast (in fact, even faster than native C++ because of a lot of underlying optimizaiton). I for one would like to use it heavily in all my work that involves numerical heavylifting in R, but this limits me from using it in any package that has a dot in the name. If we're OK changing package names, we can just do that, but I wanted to call everyone's attention to it first.
The developer has explicitly pointed out that you can't do this, unless we do manual comiplation, which is a lot harder (but I guess a possibility): http://stackoverflow.com/questions/20720796/package-compilation-fails-when-package-name-contain-a-dot-and-rcpp-function.