[Rcpp-devel] Transform arbitrary R object into std::vector<vector<double>>

Sameer D'Costa sameerdcosta at gmail.com
Thu May 19 14:40:07 CEST 2016


On Thu, May 19, 2016 at 7:07 AM Dirk Eddelbuettel <edd at debian.org> wrote:

>
> I'd consider Rcpp::Function as a last resort. You do not need it here.
>

Yes I don't like using Rcpp:Function either however it isn't easy to
convert a data.frame into matrix in Rcpp. You have to write code to deal
with factors and non-numeric columns that might be passed in. Also the
original question was asked for SEXP objects. And I'm not sure how you
would deal with those without Rcpp::Function. If there is an easy way I
would be interested in learning about it.

Rgds
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20160519/16e4ab9a/attachment.html>


More information about the Rcpp-devel mailing list