On Tue, Oct 9, 2012 at 1:06 PM, [email protected] <[email protected]> wrote: > 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 > complains > error: no matching function for call to > ‘arma::Mat<double>::submat(arma::uvec&, int&)’
Basically your problem comes down to looking at each pair of columns and determining the joint missingness pattern. You can try to force the calculation into arma but I think you are better off just writing the code in loops. To be careful you should calculate the means of each column on the pairwise non-missing values as in the enclosed function. > On 9 October 2012 19:55, Dirk Eddelbuettel <[email protected]> wrote: >> >> >> On 9 October 2012 at 19:07, [email protected] 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 | [email protected] | http://dirk.eddelbuettel.com > >
foo.R
Description: Binary data
_______________________________________________ Rcpp-devel mailing list [email protected] https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
