[Rcpp-devel] Advice on making interface into existing C++ library
Dirk Eddelbuettel
edd at debian.org
Tue Jan 13 13:21:00 CET 2015
On 13 January 2015 at 00:16, Jeffrey Wong wrote:
| Hello,
|
| I am very interested in making libFM accessible through R via Rcpp
|
| https://github.com/srendle/libfm
|
| The makefile for libFM will compile the libFM.cpp file in the src/libFM
| directory and dump the result in a bin/ directory, which is normally accessed
| through command line. What would be the best way for making this accessible
| through Rcpp?
I'd start with the src/libfm/Makefile, see what it compiles into libfm (ie
*.cpp and tools/{transpose,convert.cpp}) and just copy that to src/ of your
package. R takes care of the rest.
Working with an external library is doable but harder. Other R packages do
it, can't think of an Rcpp-using package that does though.
Dirk
--
http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
More information about the Rcpp-devel
mailing list