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

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to