[Rcpp-devel] Internals: how does DataFrame get initialized?
Dirk Eddelbuettel
edd at debian.org
Wed Feb 29 13:56:38 CET 2012
On 29 February 2012 at 14:51, Darren Cook wrote:
| > 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 )
|
| It does:
| return DataFrame(
| internal::try_catch(
| ::Rcpp_lcons(
| ::Rf_install( "data.frame"),
| 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
| anything?)
|
| 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?
Source files are in a directory src/ which is the usual place for R packages.
Headers are in inst/include/ as everything below inst/ will be included into
a binary R packages.
Hth, Dirk
--
"Outside of a dog, a book is a man's best friend. Inside of a dog, it is too
dark to read." -- Groucho Marx
More information about the Rcpp-devel
mailing list