r - Dropping columns out of loading files into a list -
this question has answer here:
- only read limited number of columns 3 answers
i'm working huge data files (several hundred mbs) , need efficient possible. i'm using lapply function load files list, due nature of file origin there couple columns don't need.
dfs <- list.files(pattern="*.txt") dfss <- lapply(dfs,read.table)
i use drop=c("id","num")
command read.table
:
file <- read.table(drop=c("id","num"))
but won't work here. suggestions?
what :
dfss <- lapply(dfs,read.table,drop=c("id","num"))
Comments
Post a Comment