例如:三个 R 工作A.RData
区B.RData
和C.RData
。
- In
A.RData
: 一个列表对象list.example <- list(1,2)
- In
B.RData
: 同名列表对象list.example <- list(NULL,NULL,3)
- In
C.RData
: 同名列表对象list.example <- list(NULL,NULL,NULL,4)
我想在新工作区中得到一个list.new.example
打印为的对象:
[[1]]
[1] 1
[[2]]
[1] 2
[[3]]
[1] 3
[[4]]
[1] 4
我努力了
file.full <- list.files(directory, full.names = TRUE)
list.new.example <- list()
for (i in 1:3) {
load(file.full[i])
list.new.example <- c(list.new.example, list.example)
}
print(list.new.example)
但这不是我想要的。NULL
正在填充。那谢谢啦。