[R] append to list

David Winsemius dwinsemius at comcast.net
Fri Jun 19 00:26:50 CEST 2009


On Jun 18, 2009, at 6:09 PM, bram 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.

That is a five year old link, but were you reading the list yesterday?  
The question was asked and answered.


>
> Any tips?
>

Read R-help?

> 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.

David Winsemius, MD
Heritage Laboratories
West Hartford, CT




More information about the R-help mailing list