[R] Rcpp, dyn.load and C++ problems

Dirk Eddelbuettel edd at debian.org
Sun Dec 3 20:59:14 CET 2017


On 3 December 2017 at 20:30, Martin Møller Skarbiniks Pedersen wrote:
| On 3 December 2017 at 20:19, Dirk Eddelbuettel <edd at debian.org> wrote:
|   Thanks for your answers. I got a few more questions.
| 
| >
| > 0) Wrong list. Rcpp has its down, rcpp-devel, and I basically do not read
| > this and would have missed this were it not for luck.
| 
| OK. I did found the rcpp-devel mailing-list.
| But I though it was a developers of the rcpp-package.
| So it is ok to post beginners questions to rcpp-devel?

Very much so. Just peruse the archive. We have a non-public and very quiet
list Rcpp-core for development of Rcpp -- as opposed 'developing with Rcpp'.

| Basically I was searching for ways to compile to C++ code a single time and
| not everything the R code runs.

A package does that for you. Just how Rcpp itself contains compiled code. Or
any of the ~ 1250 packages on CRAN. Each compiled once, running as often as
you want thereafter.
 
On 3 December 2017 at 20:42, Martin Møller Skarbiniks Pedersen wrote:
| >
| > > edd at bud:~$ r -lRcpp -e'sourceCpp("/tmp/mmsp.cpp")'
| 
| 
| ???
| 
| What is r in this case ? A alias for something ?

Littler, another (CRAN) package of mine. I explained that a few lines
lower. If it still confuses you imagine you saw

$ Rscript -e 'Rcpp::sourceCpp("/tmp/mmsp.cpp")'

Dirk

-- 
http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org



More information about the R-help mailing list