[R] List of lists ?

Carlos Petti carlos.petti at gmail.com
Mon Aug 9 18:57:57 CEST 2010


Dear list,

I have to use a list of lists containing vectors.

For instance :

[[1]]
[[1]][[1]]
[1] 1 2 3

[[1]][[2]]
[1] 3 2 1

I want to attribute vectors to the main list

without use of an intermediate list,

but it does not work :

x <- list()
x[[1]][[1]] <- c(1, 2, 3)
x[[1]][[2]] <- c(3, 2, 1)

Thanks in advance,
Carlos



More information about the R-help mailing list