Re: [R] Indexing a loop-created list

From: Richard M. Heiberger <>
Date: Thu 19 Oct 2006 - 15:55:45 GMT

m <- 2
n <- 3

matlist <- matrix(vector("list"), m, n)

for (i in 1:m)
  for (j in 1:n)
    matlist[[i,j]] <- matrix(sample(12), 3, 4)

matlist[[1,2]] ## access with double[[ subscripts mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Fri Oct 20 05:27:36 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Thu 19 Oct 2006 - 19:30:11 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.