tmb

How do I see and replicate the R default Makevars configuration?

本秂侑毒 提交于 2020-01-05 01:59:25
问题 I do not have a ~/.R/Makevars file and > tools::makevars_user() character(0) > tools::makevars_site() character(0) Yet, R must be reading the configuration from somewhere as .cpp files containing Rcpp exports in the package src subdirectory compile fine. I am interested to know how to write a Makefile.win in the src directory so that Rcpp files continue to compile, alongside TMB .cpp files. Currently a makefile like: all: fn1.dll fn2.dll fn1.dll: fn1.cpp Rscript --vanilla -e "TMB::compile(

How do I see and replicate the R default Makevars configuration?

不羁岁月 提交于 2020-01-05 01:59:12
问题 I do not have a ~/.R/Makevars file and > tools::makevars_user() character(0) > tools::makevars_site() character(0) Yet, R must be reading the configuration from somewhere as .cpp files containing Rcpp exports in the package src subdirectory compile fine. I am interested to know how to write a Makefile.win in the src directory so that Rcpp files continue to compile, alongside TMB .cpp files. Currently a makefile like: all: fn1.dll fn2.dll fn1.dll: fn1.cpp Rscript --vanilla -e "TMB::compile(

Guidelines for including TMB c++ code in an R package

对着背影说爱祢 提交于 2019-12-13 15:35:36
问题 I've recently discovered the wonders of TMB and I'm working on a package which would ideally include TMB c++ templates in it for rather computationally expensive models. I'm assuming that there's a possibility of: Automatically compiling the TMB source code on package install but I can't find any clear guidelines in the TMB documentation regarding this. As of now, my alternative is to write functions that compile the TMB code upon the first call of a function which uses an uncompiled class...