From jeff.horner at vanderbilt.edu  Thu Aug 31 17:57:34 2006
From: jeff.horner at vanderbilt.edu (Jeffrey Horner)
Date: Thu, 31 Aug 2006 10:57:34 -0500
Subject: [Rd] stop R mainloop without calling exit(1)
In-Reply-To: <903fbcd30608310833h7a06b4d8p682912f0041d1baa@mail.gmail.com>
References: <903fbcd30608310552w2f3d6350p72e7e52c0144cc4b@mail.gmail.com>	<Pine.LNX.4.64.0608311406130.22477@gannet.stats.ox.ac.uk>	<Pine.LNX.4.64.0608311429420.22954@gannet.stats.ox.ac.uk>	<903fbcd30608310831s4b323e4fya224e99961b97db9@mail.gmail.com>
	<903fbcd30608310833h7a06b4d8p682912f0041d1baa@mail.gmail.com>
Message-ID: <44F706EE.7040802@vanderbilt.edu>

Thomas Kelder wrote:
[...]

> By the way, I use R version 2.2.1 in linux, because I got the "Error:
> C stack usage is too close to the limit R" error in higher versions (I
> saw there was a topic about this already:
> https://stat.ethz.ch/pipermail/r-devel/2006-April/037219.html). I
> tried to use the R-devel version to make use of the Rf_endEmbeddedR
> method, but the error also occurs in this version. Could this be a
> bug?

Try this in your code. It turns off stack checking altogether:

     #ifdef CSTACK_DEFNS
     /* Don't do any stack checking */
     R_CStackLimit = -1;
     #endif
     Rf_initEmbeddedR(R_argc, R_argv);


Jeff
-- 
http://biostat.mc.vanderbilt.edu/JeffreyHorner




[Rd] stop R mainloop without calling exit(1)
Jeffrey Horner