Re: [Rcpp-devel] Segfault error during simulation in Rcpp

2013-05-09 Thread Jared Murray
I have had a similar experience; I wrote a small-moderate sized function to do some simulations and tested via sourceCpp() (and included an explicit instance of RNGScope() as well) with no problems whatever. Then I wrote a wrapper to this function and tried running it in parallel with mclapply and

Re: [Rcpp-devel] rcpp overhead

2012-03-11 Thread Jared Murray
I don't have the answer to his question, but it looks like he's not comparing R to Rcpp/C++ but rather "pure" C++ to Rcpp/C++. And the suspect code he posted isn't doing anything obviously (to me) silly, like repeatedly calling back into R (of course it would have bigger problems trying to do that

Re: [Rcpp-devel] Easy way to subset a matrix

2011-09-21 Thread Jared Murray
In a related vein, is there any functionality - existant or planned - for "fancy" indexing (that is, selecting non-continguous submatrices) a la X = matrix(1:24, nrow=3) Y = X[,c(2,4,7)] As it stands I'd create a new matrix and loop over the column indices to populate it. Not a big deal since my