[R] reading matrix objects into a list

Paul Baer pbaer at berkeley.edu
Thu Oct 13 21:40:51 CEST 2005


OK, I've tried to be a good citizen and use the searchable archives, 
but with three search strings I haven't found the answer to what must 
really be a simple question.

I want to create a list of objects from a set of matrices (in this 
case, 300x300). Suppose the first matrix is A. I tried:

>  x=as.list(A)

But it I get a list of length 90,000

>  length(x)
[1] 90000

instead of length 1, which is what I expected.

What's the simple trick I'm missing?

Thanks,

--Paul




More information about the R-help mailing list