[Rcpp-devel] Can I use inline-Rcpp in the package?

Dirk Eddelbuettel edd at debian.org
Wed Mar 28 21:47:24 CEST 2012


On 28 March 2012 at 14:51, Seungki Kim wrote:
| Hi,
| 
| How can I compile inline-Rcpp in the package?

You can, but we think you should not. See the Rcpp-FAQ vignette for more.
 
| I have made a package with Rcpp.package.skeleton("abcd"), and added a
| ".R" including inline-Rcpp.

The two are orthogonal. If you have a working package---as created by 
Rcpp.package.skeleton(...), you do /not/ need inline.

Read the docs, look at the files created by Rcpp.package.skeleton().

Dirk

| And it can be packaged and installed well with R CMD build, check and INSTALL.
| I loaded it with library(abcd) command, and called the function
| defined by cxxfunction() but it is not working. The error is "NULL
| value passed as symbol address"
| I think a runtime is needed for compiling inline-Rcpp, but library()
| command is not a runtime.
| I have tried that it is compiled in the function call. But it is not
| good because it is compiled every time the function is called.
| 
| Do I need to make it .cpp in the directory-src? Can I use inline-Rcpp
| in the package?
| 
| - Khaan
| _______________________________________________
| Rcpp-devel mailing list
| Rcpp-devel at lists.r-forge.r-project.org
| https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel

-- 
R/Finance 2012 Conference on May 11 and 12, 2012 at UIC in Chicago, IL
See agenda, registration details and more at http://www.RinFinance.com


More information about the Rcpp-devel mailing list