Skip to content
Prev 309766 / 398502 Next

mergeing a large number of large .csvs

It easier than that.  I forgot I can do it entirely within R:

setwd("/temp/csv")
files <- Sys.glob("daily*csv")
output <- file('Rcombined.csv', 'w')
for (i in files){
    cat(i, '\n')  # write out file processing
    input <- readLines(i)
    input <- input[-1L]  # delete header
    writeLines(input, output)
}
close(output)
On Sat, Nov 3, 2012 at 4:56 PM, jim holtman <jholtman at gmail.com> wrote: