Le 16/03/10 01:33, Douglas Bates a écrit :
>
> I have been using the begin method to obtain a pointer to the contents
> of an Rcpp::Vector object. For example
>
> Rcpp::NumericVector foo(10);
> double *ptr = foo.begin();
>
> Would a preferred idiom be
>
> double *ptr =&foo[0]:
>
> In C I would use
On 15 March 2010 at 21:10, Dirk Eddelbuettel wrote:
| The classes are meant to be somewhat opaque and you're really supposed to
| poke in like that even when it works.
A "not" went missing there...
Dirk
--
Registration is open for the 2nd International conference R / Finance 2010
See http:
On 15 March 2010 at 19:33, Douglas Bates wrote:
| I have been using the begin method to obtain a pointer to the contents
| of an Rcpp::Vector object. For example
|
| Rcpp::NumericVector foo(10);
| double *ptr = foo.begin();
I use that form. And we have gotten fond of the begin() notion which op
I have been using the begin method to obtain a pointer to the contents
of an Rcpp::Vector object. For example
Rcpp::NumericVector foo(10);
double *ptr = foo.begin();
Would a preferred idiom be
double *ptr = &foo[0]:
In C I would use the REAL function to obtain a pointer to the contents
of the