How to combine two lists?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to combine two lists?

Jiantao Shi
Hi every,
I have two lists,one has 10 elements,another has 20 elements.And each
element in these two lists has a unique name.I want to know  how to combine
these two lists, so i can index the elements by their names.

Thanks.
Jiantao Shi

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: How to combine two lists?

Gabor Grothendieck
c(list(a=1,b=2), list(c=3,d=4))

or

append(list(a=1,b=2), list(c=3,d=4))


On 12/30/05, Xiao Shi <[hidden email]> wrote:

>
> Hi every,
> I have two lists,one has 10 elements,another has 20 elements.And each
> element in these two lists has a unique name.I want to know  how to
> combine
> these two lists, so i can index the elements by their names.
>
> Thanks.
> Jiantao Shi
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html
>

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html