[Rd] RcppTemplate 4.0 with data frame support
Dominick Samperi
dsamperi at DecisionSynergy.com
Tue Jul 11 17:44:09 CEST 2006
Data frame support has been added to the package
RcppTemplate 4.0, a template/class library that facilitates the
use of C++ libraries from R.
On the C++ side the code might look something like:
RcppFrame frame(fp); // Here fp is the input SEXP corresponding to an R
data frame.
vector<vector<ColDatum> > table = frame.getTableData();
...
level = table[row][col].getFactorLevel();
name = table[row][col].getFactorName();
...
Thanks to Hin-Tak Leung and other users of this mailing list for
helpful comments.
The RcppTemplate package also contains detailed instructions on
using MinGW and MS Visual C++ under Windows.
ds
More information about the R-devel
mailing list