[Rcpp-devel] Internals: how does DataFrame get initialized?
darren at dcook.org
Wed Feb 29 06:51:58 CET 2012
> It also includes "DataFrame_generated.h", which contains
> automatically generated constructors with 1 to X (currently X=20)
> "Named" arguments.
Thanks. (your URL didn't give me permission, but I found it on my
machine in /usr/local/lib/R/site-library/Rcpp/include/Rcpp )
pairlist( t1, t2, t3, t4, t5 )
pairlist() appears to initialize a PairList object, which is a
DottedPair object. (It derives from PairList, but does not seem to add
DottedPair derives from RObject, but adds, er, functions. (Which Rcpp
functionality is this adding? Why are these functions in their own class
and not in RObject?)
Finally RObject is the class that holds the SEXP.
Last must-be-easy question of this email: where is RObject.cpp? Where is
the RObject::setSEXP() function body?
>> I wanted to understand what this code  actually does:
>> std::vector<double> vt, vpx, vsz;
>> std::vector<std::string> vsrc, vtype;
>> Rcpp::DataFrame df = Rcpp::DataFrame::create(
>> Rcpp::Named("t", vt),
>> Rcpp::Named("type", vtype),
>> Rcpp::Named("src", vsrc),
>> Rcpp::Named("px", vpx),
>> Rcpp::Named("sz", vsz)
>> Rcpp::Named(x,y) was easy : it makes a little object that just stores
>> references to the two variables.
>> Understanding Rcpp::DataFrame::create() was harder , with 5
>> constructors, none of which seem like they would do the job. Can someone
>> give me a pointer to what I should study next.
>> : Extracted from:
>> Darren Cook, Software Researcher/Developer
>> http://dcook.org/work/ (About me and my work)
>> http://dcook.org/blogs.html (My blogs and articles)
>> Rcpp-devel mailing list
>> Rcpp-devel at lists.r-forge.r-project.org
Darren Cook, Software Researcher/Developer
http://dcook.org/work/ (About me and my work)
http://dcook.org/blogs.html (My blogs and articles)
More information about the Rcpp-devel