Re: [Rcpp-devel] crash in Rcpp::Environment::find()

2013-05-10 Thread Dirk Eddelbuettel
On 10 May 2013 at 16:18, Pratibha Rana wrote: | Hi, | | My application crashes sometimes while initializing RInside. It crashes | while in Rcpp::Environment::find(). The crash doesn't happen always. | Here is the backtrace. Any ideas what's going on.. | | (gdb) bt | #0 0x2abbdf606285 in ra

[Rcpp-devel] crash in Rcpp::Environment::find()

2013-05-10 Thread Pratibha Rana
Hi, My application crashes sometimes while initializing RInside. It crashes while in Rcpp::Environment::find(). The crash doesn't happen always. Here is the backtrace. Any ideas what's going on.. (gdb) bt #0 0x2abbdf606285 in raise () from /lib64/libc.so.6 #1 0x2abbdf607d30 in abort (

Re: [Rcpp-devel] [RCPP Sugar] sapply function

2013-05-10 Thread Julien Duvanel
Hello, Thanks for you quick answer (again!). After some research, I found the functions : Mapply_2, and Mapply_3. I'll have a look how it works. I haven't understood the second proposition but if the first one works it's fine. Have a nice evening, J. Le vendredi, 10 mai 2013 à 17:47, Roma

Re: [Rcpp-devel] [RCPP Sugar] sapply function

2013-05-10 Thread Romain Francois
Iirc we have mapply2 and mapply3. Otherwise you can make Foo a helper class instead of a function. And you embed the 3 variables in your class. Le 10 mai 2013 à 17:40, Julien Duvanel a écrit : > Hello again, > > I hope I don't disturb you too much. I have again a small question. I haven't

[Rcpp-devel] [RCPP Sugar] sapply function

2013-05-10 Thread Julien Duvanel
Hello again, I hope I don't disturb you too much. I have again a small question. I haven't seen the answer on your vignette, maybe this is not possible. Here's what I would like to do : double Foo(double x, double a1, double a2) { return f(x,a1,a2); } NumericVector myVec; sapply(myVec, Foo(