[R] 3 dimensional matrix??

Jonathan Baron baron at cattell.psych.upenn.edu
Fri Jun 15 02:40:12 CEST 2001

Q: Perhaps this is obvious...but is there anyway to create a matrix
like object with has more than 2 dimensions.  I want to estimate
a bunch of var/cov matrices inside an index loop.  It would be
more computationally efficient to do this in C...but R makes many
of the operations inside the loop really easy!  Thanks.


A: Look at array().  I'm not sure I understand, but you might be
able to use the index for one of the array's dimensions, and the
two other dimensions for each matrix.  Arrays can have more than
3 dimensions.

Jon Baron

r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list