[R] is it possible to form matrix of matrices...and multiple arrays

vincent@7d4.com vincent at 7d4.com
Thu Sep 29 12:01:47 CEST 2005


Prof Brian Ripley a écrit :

> On Thu, 29 Sep 2005 vincent at 7d4.com wrote:
>> I don't think you can use matrix() to store other matrix() inside.
>> But array() is a solution to store matrix() inside.
>> (At least I have use it).
> 
> You _can_ do this with matrix() (although that was not quite what was 
> asked). Try
> a <- b <- c <- d <- matrix(1:4, 2, 2)
> e <- matrix(list(a,b,c,d), 2,2)

sorry for the wrong answer, and thanks for the correction.
(I certainly do not use list() as much as it should be.)




More information about the R-help mailing list