[R] How to add obj to a list?

Wensui Liu liuwensui at gmail.com
Thu Feb 15 21:23:56 CET 2007


a = 1:2
b = 1:3
yours = list()
yours[[1]] = a
yours[[2]] = b

On 2/15/07, Perez Alvarez, Susana <spalvarez at ico.scs.es> wrote:
> Hello everybody!
>
> I'm quite new using R and i'm trying to develope a function, but i have
> a problem.
> What i want to build is something like an objects vector. I have a list
> with two tables, and after or next to them, I want to add more tables or
> vectors to that list one by one.  But i cannot find how to do it!
> Does someone can help me?
>
> I will be very grateful for any of your help!
>
> Thank you in advance,
> susana.
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at stat.math.ethz.ch 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.
>


-- 
WenSui Liu
A lousy statistician who happens to know a little programming
(http://spaces.msn.com/statcompute/blog)



More information about the R-help mailing list