Planeshifter / node-Rstats

[UNMAINTAINED] An interface for node.js to statistical programming language R based on the fabulous Rcpp package
GNU General Public License v2.0
58 stars 16 forks source link

Can I close an R session? #4

Open PaulMougel opened 9 years ago

PaulMougel commented 9 years ago

At the moment, it is impossible to open two R sessions at the same time. This is fine, but I would like to actually close an R session to start with a fresh one (to have an empty workspace, no old variables declared, etc.)

I haven't found in the documentation nor in the source code how to close an existing R session. Is it possible?

Edit: I supposed this is related to RInside's destructor, but I'm clueless on how to implement this.

Planeshifter commented 9 years ago

Hi Paul, you are correct, it is currently not possible to close the session. I cannot promise that I will be able to fix it very soon, as I am also quite clueless. Problem is that we cannot simply destroy the RInside object, but also have to let the JS wrapper object know that the session is closed. I will have to dig deeper into Google's V8 engine in order to solve this. Best wishes, Philipp