[Rcpp-devel] Rcpp - External Libraries

Dirk Eddelbuettel edd at debian.org
Fri May 27 21:09:36 CEST 2016


Hi Drew,

On 27 May 2016 at 14:11, Drew Boyette wrote:
| I'm currently collaborating with several other professors on a C++
| evolutionary-based model, and my task is to find a way to run the program in R.
| In our model, we utilized the SNAP library (https://snap.stanford.edu/snap/) to
| simulate social network dynamics and generate graphs. My question is, will this
| require us to build a separate R package to implement the necessary functions
| from SNAP, or is there simpler way of accomplishing this? I know there are
| examples of building R packages using external libraries with Rcpp, but I'm
| fairly new to Rcpp and I was hoping for a clear explanation of how this works,
| and I wanted to make sure whether it's necessary to build a package in R. 

First off, in general "it all depends" on the particularities of the
library. This is not a 'answered in one sentence' topic, which is why
we have entire vignette devoted to it.

Second, glancing at Snap's own Makefile in snap-core at
https://github.com/snap-stanford/snap/blob/master/snap-core/Makefile
you may be able to get by with building libsnap.a as part of the package and
then using it.  Not a beginner's topic.

Third, I vaguely recalled having seen Snap in the context R before, and a
quick Google search resulting in finding
https://cloud.r-project.org/web/packages/influenceR/index.html

Maybe you can study their setup?  We can help you with more specific Rcpp
questions. 

Dirk

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


More information about the Rcpp-devel mailing list