[英]Combine dataframe from two list to a single list
I have two lists containing multiple dataframes listA
and listB
.我有两个包含多个数据
listA
和listB
的列表。 The first list has 5 dataframe, and the second list has 3 dataframe.第一个列表有 5 个 dataframe,第二个列表有 3 个 dataframe。 I want to form a third list
listC
where it contains the dataframes from both list such that I will have 8 dataframes in total in listC
.我想形成第三个列表
listC
,其中包含两个列表中的数据帧,这样我将在listC
中总共有 8 个数据帧。 I tried using merge()
, but it didn't seem to work.我尝试使用
merge()
,但似乎没有用。
The function to use is append()
:使用的 function 是
append()
:
df <- data.frame(v1 = c(1,2))
l1 <- list(df, df, df, df)
l2 <- list(df, df)
l3 <- append(l1, l2)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.