Skip to content
Prev 233775 / 398500 Next

Matrixes inside matrixes

Hi,

You can have each cell of a matrix contain a matrix, but for a reason
that is just not clear to me the matrices are wrapped in a list,

m = matrix(replicate(4,matrix(1:9,3,3),simplify=FALSE), 2,2)

m[1,2][[1]]

str(m)

and even more surprising to me, m itself has become a list for some reason.

baptiste
On 8 September 2010 17:22, Alaios <alaios at yahoo.com> wrote: