[R] Appending to list

Gabor Grothendieck ggrothendieck at myway.com
Wed Feb 9 23:25:58 CET 2005


Mike Prager <Mike.Prager <at> noaa.gov> writes:

: 
: An R program needs to accumulate a list (length unknown until done) of 
: objects.  How efficiently and repeatedly can one append new objects to the 
: list?
: 
: I have been using something like
: 
: mylist[[length(mylist)+1]] = newobject
: 
: but I wonder if there is something better.
: 

This was discussed last month:

https://www.stat.math.ethz.ch/pipermail/r-help/2005-January/062088.html




More information about the R-help mailing list