[Rcpp-devel] Correlation in ArmadilloRcpp with missing values (nan)

mateusz.kaduk at gmail.com mateusz.kaduk at gmail.com
Tue Oct 9 20:06:48 CEST 2012

Maybe I am not good in coding, but even though I managed to make uvec with
ones and zeros, I cannot use it to select rows  in given column, compiler
error: no matching function for call to
‘arma::Mat<double>::submat(arma::uvec&, int&)’

On 9 October 2012 19:55, Dirk Eddelbuettel <edd at debian.org> wrote:

> On 9 October 2012 at 19:07, mateusz.kaduk at gmail.com wrote:
> | Can you provide an example how to convert Armadillo colvec to uvec
> vector which
> | I assume works as selector for rows?
> You may need to loop (or use STL iterators) to fill the uvec position by
> position.  Then use the subset, and proceed with your correlation
> calculation.  I don't think there is a shortcut.
> Dirk
> --
> Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20121009/a40fa01b/attachment.html>

More information about the Rcpp-devel mailing list