Re: [Rcpp-devel] Evaluating Formula's in Rcpp

2013-05-03 Thread Dirk Eddelbuettel
Hi Gabriel, On 3 May 2013 at 22:04, Gabriel Hoffman wrote: | Hi, | I any trying to develop an R function for running 1000's of | regressions very fast. I will omit the technical reasons for this, but | I would like to write code to perform the following: | | for(j in 1:ncol(X) ){ |

[Rcpp-devel] Evaluating Formula's in Rcpp

2013-05-03 Thread Gabriel Hoffman
Hi, I any trying to develop an R function for running 1000's of regressions very fast. I will omit the technical reasons for this, but I would like to write code to perform the following: for(j in 1:ncol(X) ){ fit = myRegression( y ~ age:X[,j] ) } This uses R's convenient 'formula' f

Re: [Rcpp-devel] Returning Armadillo matrices with dimnames

2013-05-03 Thread Krzysztof Sakrejda
On May 2, 2013 11:22 PM, "Dirk Eddelbuettel" wrote: > > > On 2 May 2013 at 17:24, Dirk Eddelbuettel wrote: > | Sorry. It was just a quick guess. > | > | On second thought, I think your earlier approach was actually pretty good: > | Take your arma object, use wrap to turn it into a SEXP (or maybe a