From dsamperi at DecisionSynergy.com  Tue Jul 11 17:44:09 2006
From: dsamperi at DecisionSynergy.com (Dominick Samperi)
Date: Tue, 11 Jul 2006 11:44:09 -0400
Subject: [Rd] RcppTemplate 4.0 with data frame support
Message-ID: <44B3C749.8050401@DecisionSynergy.com>

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



[Rd] RcppTemplate 4.0 with data frame support
Dominick Samperi