Re: [Rcpp-devel] Accessing/Copying rows/columns of matrices

2011-03-24 Thread Dirk Eddelbuettel
Michael, On 24 March 2011 at 17:45, Michael Braun wrote: | Hi, all. Another question as I embark on my first project that uses Rcpp. | | Consider the following test code, that comes right off of the Using Matrices section of the Rcpp-quickref file on CRAN. | | RcppExport int test() { | | R

[Rcpp-devel] Accessing/Copying rows/columns of matrices

2011-03-24 Thread Michael Braun
Hi, all. Another question as I embark on my first project that uses Rcpp. Consider the following test code, that comes right off of the Using Matrices section of the Rcpp-quickref file on CRAN. RcppExport int test() { Rcpp::NumericMatrix xx(3,2); int i; int xsize = xx.nrow() * xx.ncol();