Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在处理巨大的数据文件(数百 MB),并且需要尽可能高效。我正在使用 lapply 函数将所有文件加载到列表中,但由于文件来源的性质,有几列我不需要。
dfs <- list.files(pattern="*.txt") dfss <- lapply(dfs,read.table)
我通常使用以下drop=c("ID","num")命令read.table:
drop=c("ID","num")
read.table
file <- read.table(drop=c("ID","num"))
但在这里行不通。有什么建议么?
关于什么 :
dfss <- lapply(dfs,read.table,drop=c("ID","num"))