Re: [R] extracting a subset of sublists form a list; vectorized form

2008-10-08 Thread Claudia Beleites
Dear Javier, > sublists, to be passed to a function, sintaxis like this won't work: > >> sublist <- main.lst[[1:4]] are you looking for: sublist <- main.lst[1:4] HTH Claudia __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-

[R] extracting a subset of sublists form a list; vectorized form

2008-10-08 Thread jgarcia
Hello; I'll put my real problem through a simple example: I've got a main list: > main.lst <- lst() With a number of sublists: > for(i in 1:1000){ main.lst[[i]] <- list() main.lst[[i]]$first <- runif(1,0,1) main.lst[[i]]$second <- runif(2,3,4) } If later on I need to split this list