[英]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: 我想要一个包含4个元素的列表:列表a,列表b和列表c的组件:
list(list(a=1, b=2), list(c=3, d=4), e = 5, f = 6)
您可以只使用c
运算符:
c(list(a,b), c)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.