[Rcpp-devel] armadillo mailing list?

baptiste auguie baptiste.auguie at googlemail.com
Thu Jul 29 09:30:35 CEST 2010


Dear all,

I'm porting some R code to C++ using the armadillo framework (I'm
using operations on complex matrices, etc.). The final goal is of
course to wrap the code using RcppArmadillo. Currently, I'm still
struggling with my little C++ knowledge. Does anyone know of an
Armadillo mailing list where I could ask C++ questions?

Just in case, I'll ask here too. I have a small 3x3 matrix that I
generate in a nested for loop, and I want to insert this matrix as a
block inside a larger matrix. In R language, I'd want to use a
construct like,

A[ seq(ii, ii+2), seq(jj, jj+2)] <- matrix(rnorm(9), 3, 3)

I tried the following as a test,

mat A = "0 0 0; 0 0 0; 0 0 0;";
A.submat(1,1,1,1) = 1;

but it seems that .submat is only to view elements, not assign them
(the `[<-` method in R). Any tip?

Sincerely,

baptiste


More information about the Rcpp-devel mailing list