Dear All, As always, I appreciate all your help. I would like to know the easiest way to convert each of the homogeneous elements of a numeric list into a matrix. Each element of this list is also a list such that when displayed, looks like a 2-by-3 matrix , I would like to convert each of them into a matrix, without changing the double index of each entry.
Suppose: a<- vector("list",2) > a[[1]] [,1] [,2] [,3] [1,] 1 2 0 [2,] 3 4 5 > a[[2]] [,1] [,2] [,3] [1,] 5 6 9 [2,] 7 8 10 >is.list(a[[1]]) True Target: I would like to convert a[[2]] into a matrix, keeping the double index, into > mat1 [,1] [,2] [,3] [1,] 5 6 9 [2,] 7 8 10 The list I have is huge and so is each of its elements, and do not want to use unlist because I do not understand it fully. Thank you, Chee [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.