简体   繁体   中英

How do I combine a list with the elements of another list in R?

I know there is a simple function for this, but I can't find it anywhere. I have:

a <- list(a=1,b=2)
b <- list(c=3,d=4)
c <- list(e=5,f=6)

I want a list with 4 elements, list a, list b and the components of list c:

list(list(a=1, b=2), list(c=3, d=4), e = 5, f = 6)

您可以只使用c运算符:

c(list(a,b), c)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM