سؤال

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.

هل كانت مفيدة؟

المحلول

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.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top