Thanks Dirk, would I still create a rcpp skeleton package and dump the *.cpp files into src, then just use Rcpp::export? What about all the .h files in that library?<div><br></div><div>Thanks <span></span><br><br>On Tuesday, January 13, 2015, Dirk Eddelbuettel <<a href="mailto:edd@debian.org">edd@debian.org</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
On 13 January 2015 at 00:16, Jeffrey Wong wrote:<br>
| Hello,<br>
|<br>
| I am very interested in making libFM accessible through R via Rcpp<br>
|<br>
| <a href="https://github.com/srendle/libfm" target="_blank">https://github.com/srendle/libfm</a><br>
|<br>
| The makefile for libFM will compile the libFM.cpp file in the src/libFM<br>
| directory and dump the result in a bin/ directory, which is normally accessed<br>
| through command line.  What would be the best way for making this accessible<br>
| through Rcpp? <br>
<br>
I'd start with the src/libfm/Makefile, see what it compiles into libfm (ie<br>
*.cpp and tools/{transpose,convert.cpp}) and just copy that to src/ of your<br>
package.  R takes care of the rest.<br>
<br>
Working with an external library is doable but harder.  Other R packages do<br>
it, can't think of an Rcpp-using package that does though.<br>
<br>
Dirk<br>
<br>
--<br>
<a href="http://dirk.eddelbuettel.com" target="_blank">http://dirk.eddelbuettel.com</a> | @eddelbuettel | <a href="javascript:;" onclick="_e(event, 'cvml', 'edd@debian.org')">edd@debian.org</a><br>
</blockquote></div><br><br>-- <br><div dir="ltr">Jeffrey Wong<div>My portfolio: <a href="http://jeffreyctwong.com" target="_blank">http://jeffreycwong.com</a></div><div><br></div></div><br>