Hello,
Try the following.
lapply(1:23, function(i) 1:i)
As for why yuor code doesn't work, you're assigning 24 times a value to
V, on loop exit only the last one is there. A correct way using loops
would be
V <- list()
for(i in 1:23)
V[[i]] <- 1:i
Beware that the last vector goes from 1 _down_ to 0.
And do read An Introduction to R, file R-intro.pdf in your R/doc directory.
Hope this helps,
Em 24-10-2012 13:25, colaiutachambers escreveu:
______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide
http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.