Question

I am using Rcpp and RInside, to interconnect my R based code to c++. I make multiple distinct calls to R from c++. I wanted to know if each call to R, creates a new instance of R ?

The reason I want to know this is cos I want to optimize my c++ code, by pre-computing stuff, etc. But I don't know how the calls are internally handled ?

Thnx

-egon.

Was it helpful?

Solution

As R is single-threaded, there is precisely one instance. It is stateful. You create it once at startup, and do whichever inits you need to make.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top