(Resending, this time with CC to list. Sorry for the extra first post. --Dirk)

On 11 February 2014 at 11:49, Nick Menzies wrote:
| Is there a way to pass an array into c++ when using cppFunction?  I realize
| arrays have been discussed a number of times, but the solutions I have found
| (e.g. http://markovjumps.blogspot.com/2011/12/
| r-array-to-rcpparmadillo-cube.html, or https://www.mail-archive.com/
| rcpp-devel@lists.r-forge.r-project.org/msg05897.html) are described in the
| context of cxxfunction, and I haven't been able to work how to implement this
| with cppFunction.

An array is just a vector with a dimension attribute. Treat it the same at
the C++ level.

There are several posts at the Rcpp Gallery dealing with reading / setting
attributes, and you should know how to pass a single vector through.

Dirk

-- 
Dirk Eddelbuettel | e...@debian.org | http://dirk.eddelbuettel.com
_______________________________________________
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