Displaying 2 results from an estimated 2 matches for "vector_sexp".
Did you mean:
vector_gep
2007 Aug 16
0
call R function in c++ program
..."wxR"};
Rf_initEmbeddedR(argc, argv);
rho = R_GlobalEnv;
// in destructor
Rf_endEmbeddedR(0);
// for translate std::vector to SEXP VECTOR
// std_vector are defined as "vector<double>" and iterator as
"vector<double>::iterator"
PROTECT( vector_SEXP = allocVector(REALSXP, std_vector.size()) );
int i = 0;
for(std_iterator s_it=std_vector.begin(); s_it!=std_vector.end();
s_it++)
{
REAL(vector_SEXP)[i] = (double) *s_it;
i++;
}
UNPROTECT(1);
// for create a variable in R environement
defineVar(insta...
2006 Oct 31
1
Some R questions
Hi all,
I am working with some large data sets (1-4 GB) and have some questions
that I hope someone can help me with:
1. Is there a way to turn off garbage collector from within C interface ?
what I am trying to do is suck data from mysql (using my own C
functions) and I see that allocating each column (with about 1-4 million
items) takes between 0.5 and 1 seconds. My