On 10/13/2009 10:06 AM, Henrique Dallazuanna wrote:
Try this:
replicate(3, list())
Thanks!
I now have three ways to achieve my goal:
1: rep(list(list()), 3)
2: replicate(3, list())
3: Due to the way R recycles arguments, I found that it is enough to
have construct a list(list()), and then perform an assignment using an
argument of the length I want (using mapply()). The empty list is then
recycled enough times to hold the corresponding values.
Best,
Magnus
______________________________________________
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.