This is not a well-posed Rcpp question as

- matrix and data.frame are _fundamentally_ two different data types

- matrix being _one_ and only one storage type, or class, stored
  as one vector with dimension attribute of size two for rows and cols;
  this makes it _efficient_ and you will see a matrix type used quite a bit
  in internal R functions

- data.frame being a special case of the catch-all type list with each
  column being of same length but possibly different types -- and for that
  reason we do not have too much tooling for this 'list of vectors' in Rcpp
  besides the basics

So in short you may want to work out first what you want you algorithm to be
and maybe use higher-level converters in R to accomodate.

Dirk

-- 
dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org
_______________________________________________
Rcpp-devel mailing list
Rcpp-devel@lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel

Reply via email to