On 20 June 2013 at 05:44, Tee-Jay-Ardie wrote:
| I guess I should start reading up on .Call.
If you look back into the R-devel archives as of a few months ago, a long
thread there came (fairly strongly and unanimously) to the exact conclusion.
With that allow me to make the case a little more s
Terry Therneau-2 wrote
> Another solution is the one used for a long time in the rpart code.
> The R code called "rpart1", which does the work, keeps a static pointer to
> the object,
> does NOT
> release it's memory, and returned the size of the object.
>
> Then the R code allocates appropriate
Hello,
I would use external pointers for something like this.
If c++ is an option, you can take advantage of Rcpp classes to deal with
external pointers. Put the following in a .cpp and sourceCpp() it.
#include
using namespace Rcpp ;
class Array {
public:
Array( ) : size(10), used(0){
Another solution is the one used for a long time in the rpart code.
The R code called "rpart1", which does the work, keeps a static pointer to the
object,
does NOT
release it's memory, and returned the size of the object.
Then the R code allocates appropriate vectors and called "rpart2", which f
> should I rewrite my C code using Call in R?
Yes, rewrite it to use the .Call() interface.
Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com
> -Original Message-
> From: r-devel-boun...@r-project.org [mailto:r-devel-boun...@r-project.org] On
> Behalf
> Of Tee-Jay-Ardie
> Sent: We