[Rcpp-devel] Initialize a matrix with a vector and the dimensions

Peng Yu pengyu.ut at gmail.com
Tue Aug 28 23:17:03 CEST 2012


The closest thing that I can find to initialize a NumericMatrix with a
NumericVector is the following constructor from Rcpp/vector/Matrix.h.
But I need to see an example on how to use it. Does anybody have any
example to share with me? Thanks!

    template <typename Iterator>
    Matrix( const int& nrows_, const int& ncols, Iterator start ) :


More information about the Rcpp-devel mailing list