[Rcpp-devel] Returning an arma vec

Martyn Plummer plummerm at iarc.fr
Wed Dec 3 22:41:30 CET 2014

You just need to put a new template specialization of "wrap" for the subview_col class in RcppArmadilloWrap.h based on the existing one for the subview class. And throw in one for subview_row for good measure.

From: rcpp-devel-bounces at lists.r-forge.r-project.org [rcpp-devel-bounces at lists.r-forge.r-project.org] on behalf of Dirk Eddelbuettel [edd at debian.org]
Sent: 03 December 2014 19:25
To: Romain Francois
Cc: rcpp-devel at lists.r-forge.r-project.org
Subject: Re: [Rcpp-devel] Returning an arma vec

On 3 December 2014 at 18:30, Romain Francois wrote:
| > 2. If we replace the lines marked // x with
| >
| >       return wrap(x.subvec(1, 2));
| >
| > then it fails with a compiler error.
| >
| > error: cannot convert 'const arma::subview_col<double>' to 'SEXP' in
| > initialization
| This should be easy/trivial to fix for someone with the right skills.

Sure. Maybe Gabor wants to give it a try.


http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
Rcpp-devel mailing list
Rcpp-devel at lists.r-forge.r-project.org
This message and its attachments are strictly confidential. If you are
not the intended recipient of this message, please immediately notify 
the sender and delete it. Since its integrity cannot be guaranteed, 
its content cannot involve the sender's responsibility. Any misuse, 
any disclosure or publication of its content, either whole or partial, 
is prohibited, exception made of formally approved use

More information about the Rcpp-devel mailing list