[Solved] Memory issues in-memory dataframe. Best approach to write output?
I have been using the following snippet: library(data.table) filepaths <- list.files(dir) resultFilename <- “/path/to/resultFile.txt” for (i in 1:length(filepaths)) { content <- fread(filepaths, header = FALSE, sep = “,”) ### some manipulation for the content results <- content[1] fwrite(results, resultFilename, col.names = FALSE, quote = FALSE, append = TRUE) } finalData <- fread(resultFilename, header = FALSE, … Read more