【发布时间】:2015-12-16 21:43:17
【问题描述】:
我正在尝试将文件夹中的每个数据集加载到 R 中,通过函数运行它,将输出存储在列表中,然后在继续下一个之前将其删除。
datNames <- list.files(path = "/Some/Path/", pattern = "dl2*")
storeList <- vector(mode = "list", length = length(datNames)
for (i in 1:length(datNames) {
load(file = paste0("/Some/Path/", datNames[i]))
storeList[[i]] <- foo(<Name of data here>)
rm(<Name of data here>) }
所以基本上我想做类似上面的事情,但我不知道在“这里的数据名称”中输入什么。感谢您的任何建议。
【问题讨论】: