Hello,
In R, one can define a matrix and assign names to tows and columns:
A = matrix(1:9, nrow=3, ncol=3);
rownames(A) = c("R1", "R2", "R3")
colnames(A) = c("C1", "C2", "C3")
and then access entries in A by these row and column names instead of row
and column numbers like:
A["R1", "C1"]
I tried to find out if this is possible in some way in Rcpp for Matrix type.
I know that one can set rownames and colnames attributes for an object of
type Matrix but my understanding is that this is done for preparing an
object to be passed to R.
Is there a way to retrieve entries of a let say NumericMatrix by row and
column names ?
thanks,
Mahdi
_______________________________________________
Rcpp-devel mailing list
[email protected]
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel