Re: [Rcpp-devel] Data Persistence when using inline

2011-09-07 Thread Noah Silverman
Darren, That's an awesome answer! Thank you very much -- Noah Silverman UCLA Department of Statistics 8117 Math Sciences Building Los Angeles, CA 90095 On Sep 7, 2011, at 6:04 PM, Darren Cook wrote: >> If the code was in pure C++, it would be trivial to have an object >> and then just pas

Re: [Rcpp-devel] Data Persistence when using inline

2011-09-07 Thread Darren Cook
> If the code was in pure C++, it would be trivial to have an object > and then just pass a pointer to that object. I can't figure out how > to do the same thing with R+Rcpp+inline. I asked myself a similar question a few weeks back (actually it came from one of the questions at the end of the go

Re: [Rcpp-devel] Data Persistence when using inline

2011-09-07 Thread Noah Silverman
Awesome. Thank You! -- Noah Silverman UCLA Department of Statistics 8117 Math Sciences Building #8208 Los Angeles, CA 90095 On Sep 7, 2011, at 3:04 PM, Noah Silverman wrote: > Dirk, > > Maybe I didn't explain it well enough. The question absolutely pertains to > using the inline functionalit

Re: [Rcpp-devel] Data Persistence when using inline

2011-09-07 Thread Noah Silverman
Dirk, Maybe I didn't explain it well enough. The question absolutely pertains to using the inline functionality. As each new data arrives, I want to pass it to my C++ function. If this were a pure C++ implementation, then I would just append an STL vector and pass a pointer of that vector to

Re: [Rcpp-devel] Data Persistence when using inline

2011-09-07 Thread Dirk Eddelbuettel
On 7 September 2011 at 14:46, Noah Silverman wrote: | Hi, | | | I'm writing a function using Rcpp through inline. This function will be a | filter on an incoming data stream. | | I need to keep the past several data values so that they are accessible to the | function each time it is called.

[Rcpp-devel] Data Persistence when using inline

2011-09-07 Thread Noah Silverman
Hi, I'm writing a function using Rcpp through inline. This function will be a filter on an incoming data stream. I need to keep the past several data values so that they are accessible to the function each time it is called. This is easy to do with a data structure in R (and then passing