similar to: Question on the R's C stack limit

Displaying 20 results from an estimated 600 matches similar to: "Question on the R's C stack limit"

2007 Jul 06
1
How to disable R's C stack checking
Hi all, I'm developing an application on Mac OS X Darwin which embeds R. However, the application always crashes due to the C stack checking. I know that R_CStackLimit can be set to -1 to disable the stack checking, but I don't know where to put the code "R_CStackLimit=-1". Please give some instructions. Thank you very much! Here is my compiler infomation: $g++ -v Using
2005 Jul 20
1
(PR#8017) build of REventLoop package crashes with 2.1 due
In what way is this a bug in R? It looks like a bug in the package, and as Defn.h is not part of R's API any packge using it is `at risk' (and cannot be installed in a binary-only installation, or even an installed version of R). In particular, Defn,.h depends on config.h, and it seems you installed a binary version of R and used separate sources. I would suggest building R from
1999 Oct 12
1
Looking for R_Home ...
This is my first question to this list and possibly a bit dumb, but anyway: Can anybody tell me, where, e.g. in the "unix" reference release a DEFINITION of char * R_Home can be found? Via Defn.h the "extern" DECLARATION is everywhere, but when I derived a somewhat other main() program my linker complained about the missing definition. Thomas Hoffmann.
2007 Jun 28
1
How to set R_CStackLimit
Hi, I have tried to disable stack checking by set R_CStackLimit to -1. However, it always crashes my win32 multiple threads program. I am using R-2.5.0. My code looks like: #include <Rversion.h> #if (R_VERSION >= R_Version(2,3,0)) #define R_INTERFACE_PTRS 1 #define CSTACK_DEFNS 1 #include <Rinterface.h> #endif and then, add below line to my main function: R_CStackLimit =
2007 Aug 29
1
Modifying R_CheckStack for a speed increase
Greetings R developers, R will run a little faster when executing "pure R" code if the function R_CheckStack() is modified. With the modification, the following code for example runs 15% faster (compared to a virgin R-2.5.1 on my Windows XP machine): N = 1e7 foo <- function(x) { for (i in 1:N) x <- x + 1 x }
2019 May 19
4
most robust way to call R API functions from a secondary thread
Hi, As the subject suggests, I am looking for the most robust way to call an (arbitrary) function from the R API from another but the main POSIX thread in a package's code. I know that, "[c]alling any of the R API from threaded code is ?for experts only? and strongly discouraged. Many functions in the R API modify internal R data structures and might corrupt these data structures if
2009 May 21
1
"Error: C stack usage is too close to the limit" (can't understand explanations of how to fix this)
Apparently the way to deal with this error message is to set R_CStackLimit = (uintptr_t)-1 I tried typing this in the R console, but it says Error: object "R_CStackLimit" not found. So where do I type it? In one of the initialization files that R uses when it starts up? I can't find the answer anywhere. Please note that I don't understand words like "DLL" or
2005 Nov 27
2
'For each file in folder F do....'
Hello, I have 2700 text files in a folder and need to apply the same program/procedure to each individually. I'm trying to find how to code something like: For each file in <Folder> do {<Procedure>} is there an easy way to do this? other suggestions? I have tried to list all the files names in a vector e.g. >listfiles[1:10,1] 1 H:/Rtest/AXP.txt 2 H:/Rtest/BA.txt 3
2005 Oct 30
1
attaching the debugger to functional test.
People, I''m trying to run the ruby debugger against a Test::Unit::TestCase class which is a parent of a Rails class. I started my study with a simple script: # # bikle_test.rb # require ''test/unit'' class BikleTest < Test::Unit::TestCase def setup @string10 = "hello" end def test10 assert_equal @string10, "hello" end end The
2015 Aug 20
2
Child thread libR.so
So I'm working on a custom front end to R, in one mode of the front end I dynamically load libR.so into a child worker thread. I'm very careful to make sure it is loaded by a single thread and loaded only once, but since it is a child thread it violates assumptions made by the stack size checking inside of R and I get innumerable errors along the lines of Error: C stack usage
2012 Feb 26
2
Help needed! Error in setwd(newdir) : cannot change working directory
Hi Guys, I am new to R and just trying to write a small script to automate a couple commands. But I run into the setwd(): cannot change working directory. I googled a little bit and tried all fixes/suggestions with no success. Basically I have a script that works from inside a directory with my data (/home/sean/Rtest/Data01). Now I want to modify the script to make it run from the upper directory
2009 May 19
2
About " Error: C stack usage is too close to the limit"
Hi everyone! I meet one problem when embedding R in C code, when I run the the R code in one child thread , it always print error info: Error: C stack usage is too close to the limit I also try to set R_CStackLimit = (uintptr_t)-1 to disable the C stack check as the R-exts doc say, but it still does not work, the error info still exist. Besides it is interesting that if i
2003 Nov 20
1
Compile Packages under Windows and CHM
Hi, I have been developing a small package. It install under RedHat Linux 9.0 without a problem. However, I have a small problem under Windows XP. I am using R-1.8.0 on both systems and HTML Help Workshop 4.74.8702.0 on Windows XP. I created the package under Linux. When I try to install the package created under Linux in Windows XP using c:\rtest> rcmd install rtest I get the following
2005 Oct 08
1
windows/g95 peculiarity
I'm not looking for an answer here, this is just a report of a peculiar event I've observed and can reproduce. I'm developing a g95 (20050129) compiled package on windows xp pro using R-2.1.1, and gcc-3.4.2 (mingw special). An older version of the F95 package compiled and ran without problems. The new version of the package includes extensive changes in the code. The package has a
2005 Mar 17
1
Compiling "embedding R" examples
Hi, I am working at a major financial institution and we would like to embed R in one of our front office application. The application is written in C/C++ so I started by trying to compile the examples in "tests/Embedding" of R 2.0.1. I have modified "tests/Embedding/Makefile" according https://stat.ethz.ch/pipermail/r-help/2005-February/064341.html and set
2005 Feb 04
5
simple example of C interface to R
i'd like to use the C interface to R in a program i'm writing. as a starting point, i'm trying to create a very simple C program that uses R. i've read the R documentation on this, but i'm having trouble figuring out where SEXP is defined and how to use it. i noticed someone else on this list also tried to use the C interface, but they ran into similar problems:
2003 Sep 01
2
Error in dyn.load
Hi, I've created a shared library from including this code (with g++ -I/usr/local/lib/R/include -I/usr/local/include -c Rtest.cpp; g++ -shared -L/usr/local/lib -o Rtest.so Rtest.cpp): void check_data (SEXP data) { int l=length (data); } But when I try to load it in R I get this error message: unable to load shared library ... ... undefined symbol: _Z9Rf_lengthP7SEXPREC How can I solve
2019 May 20
1
most robust way to call R API functions from a secondary thread
Stepan, Andreas gave a lot more thought into what you question in your reply. His question was how you can avoid what you where proposing and have proper threading under safe conditions. Having dealt with this before, I think Andreas' write up is pretty much the most complete analysis I have seen. I'd wait for Luke to chime in as the ultimate authority if he gets to it. The
2010 Sep 15
4
Sas to R
Hi, I need to call an R program from Sas. I have tried using the following code in Sas using the x command but it just calls up dos and says 'D:\Program' is not recognized as an internal or external command, operable program or batch file. ] SAS CODE: options xwait xsync; %let Rsource=S:\EPI_Data\Communicable Diseases\DR1355 Historic Communicable Disease Analaysis\R graphics; options
2016 Feb 01
1
Wrong config check for __libc_stack_end
>>>>> Simon Urbanek <simon.urbanek at r-project.org> >>>>> on Mon, 1 Feb 2016 08:36:56 -0500 writes: > On Feb 1, 2016, at 4:16 AM, Martin Maechler <maechler at stat.math.ethz.ch> wrote: [..............] >> Back to R: I'm not familiar with that part of the code, neither >> the configuration, nor the usage (in