[R] RSPerl & threads II

J Greenbaum jgbaum at gmail.com
Tue Apr 8 18:46:16 CEST 2008

My previous post seems to have been eaten by the server because of
embedded code.  You can now find that code at:


I aoplogize for the double-posting...


Hi all,

I'm trying to use the RSPerl module in a script that uses threads. I am
able to call R functions without a problem when I don't use threads.
However, using threads, I get varying errors depending on how I call the R
functions. If I call the R::initR function in the "boss" thread and then
try to call R functions from a "worker" thread, I get the following error:

Error: C stack usage is too close to the limit
Caught error in R::call()

However, if I move the "use" declarations for R & RReferences to the worker
thread, along with the initR call, I get this:

Fatal error: R home directory is not defined

I've attached some code for your reference. Is there any way to get this
module working with Perl threads? Thanks in advance for your help.


More information about the R-help mailing list