[Rcpp-devel] Efficient DataFrame access by row & column

Ken Williams Ken.Williams at windlogics.com
Wed Feb 20 16:36:19 CET 2013

> -----Original Message-----
> From: rcpp-devel-bounces at lists.r-forge.r-project.org [mailto:rcpp-devel-
> bounces at lists.r-forge.r-project.org] On Behalf Of Romain Francois
> Sent: Wednesday, February 20, 2013 2:56 AM
> To: rcpp-devel at lists.r-forge.r-project.org
> Subject: Re: [Rcpp-devel] Efficient DataFrame access by row & column
> Le 20/02/13 00:09, Yan Zhou a écrit :
> > The most inefficient part I see is the creation of a new NumericVector
> inside the inner most loop. You copied each column n times, of which n-1
> times are unnecessary.
> No. This does not copy data. This uses time to protect it, etc ... but the data in
> the vector is not copied.

Excellent, then my strategy of pre-populating a NumericVector[] won't bloat memory.  Thanks for confirming.



CONFIDENTIALITY NOTICE: This e-mail message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution of any kind is strictly prohibited. If you are not the intended recipient, please contact the sender via reply e-mail and destroy all copies of the original message. Thank you.

More information about the Rcpp-devel mailing list