Try this: replicate(3, list())
On Tue, Oct 13, 2009 at 10:48 AM, Magnus Torfason <[email protected]> wrote: > Well here is one more brain-teaser related to assigning stuff into a list of > list. What if I need to create a new list of empty lists? I have actually > got a solution to this problem: > > l = list(list()) > for ( i in sequence(length-1) ) > { > l = list(unlist(l,recursive=FALSE), list()) > } > > But it is not very neat to do this in a loop. Are there any cuter ways to do > this? > > Best, > Magnus > > ______________________________________________ > [email protected] 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. > -- Henrique Dallazuanna Curitiba-Paraná-Brasil 25° 25' 40" S 49° 16' 22" O ______________________________________________ [email protected] 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.

