[R] append to list

Gabor Grothendieck ggrothendieck at gmail.com
Fri Jun 19 00:17:06 CEST 2009


Perhaps it was this:

https://stat.ethz.ch/pipermail/r-help/2005-January/063530.html

On Thu, Jun 18, 2009 at 6:09 PM, bram<a.l.w.kuijper at rug.nl> wrote:
> Hi all,
>
> how can I effectively add new objects to a list of which the eventual length
> is unknown?
>
> I have been using something like
>
> mylist[[length(mylist)+1]] = newobject
>
> but I wonder if there is something better.
>
> this question might look familiar. It is the same question as has been asked
> here:
> http://tolstoy.newcastle.edu.au/R/help/05/02/12152.html
>
> Unfortunately, the link containing the answer is broken.
>
> Any tips?
>
> Bram
>
> ______________________________________________
> R-help at 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.
>




More information about the R-help mailing list