Hi,
The new Rcpp::DataFrame follows R's tradition and automatically converts
character vectors into factors:
> fun <- cppfunction( signature(), '
+ IntegerVector v = IntegerVector::create(1,2,3);
+ std::vector s(3);
+ s[0] = "a";
+ s[1] = "b";
+ s[2] = "
Hello,
I've commited some initial code for Rcpp::DataFrame. Interesting bits are:
DataFrame( SEXP ) ;
DataFrame::create( { between 0 and 20 arguments of whatever type wrap
can handle } ) ;
So for example:
> fx <- cppfunction( , '
+ std::vector s(2) ;
+ s[0] = "hello";
+ s[1] = "world";
+
+ I