[Rd] Dealing with R list objects in C/C++

2011-01-26 Thread Wayne.Zhang
Hi, I'd like to construct an R list object in C++, fill it with relevant data, and pass it to an R function which will return a different list object back. I have browsed through all the R manuals, and examples under tests/Embedding, but can't figure out the correct way. Below is my code snip

Re: [Rd] Dealing with R list objects in C/C++

2011-01-27 Thread Wayne.Zhang
Many thanks for the quick reply Martin, your code works as expected. Next I'd like to retrieve heterogeneous data from an SEXP object (let's just pretend it's the same type as the one what I'm constructing). I'm sure the relevant APIs are defined in Rinternals.h, do we have API documentations

[Rd] How to disable R's crash prompt

2011-03-08 Thread Wayne.Zhang
Dear R devel, I have a C++ app that calls into embedded R to perform some analytic calculations. When my app encounters a segmentation fault, R always prints the following crash prompt and asks me to enter an action: *** caught segfault *** address 0x8, cause 'memory not mapped' Possible act

Re: [Rd] How to disable R's crash prompt

2011-03-08 Thread Wayne.Zhang
Thanks for your quick comment Mr. Ripley. I'm a newbie in R so excuse me for not knowing the obvious. Could you elaborate on what code I should look at, and what documentation I should go to? This is my C++ code on calling embedded R (on redhat enterprise linux 4): char *localArgs[] = { "

Re: [Rd] How to disable R's crash prompt

2011-03-08 Thread Wayne.Zhang
Hi Dirk, My code on calling embedded R from C++ is attached in the other mail. As you see, I'm not using RInside. My app already works (except when it seg faults) so I prefer not to change it. Thanks, Wayne -Original Message- From: Dirk Eddelbuettel [mailto:e...@debian.org] Sent:

Re: [Rd] How to disable R's crash prompt

2011-03-08 Thread Wayne.Zhang
That did the trick. Thank you soo much Simon! Wayne -Original Message- From: Simon Urbanek [mailto:simon.urba...@r-project.org] Sent: Tuesday, March 08, 2011 5:28 PM To: Zhang, Wayne: IT (NYK) Cc: rip...@stats.ox.ac.uk; r-devel@r-project.org Subject: Re: [Rd] How to disable R's cra

Re: [Rd] How to disable R's crash prompt

2011-03-09 Thread Wayne.Zhang
I never said I wasn't going to fix the bug, and believe me big banks do want their apps to be of high quality, but until the bugs are fixed I want my app to die instead of becoming a zombie. But thanks for your opinion and all others that offered help along the way. Wayne -Original Messa