I have 300+ .rds files each with the same column names and would like to bind them together into a single compressed .rds file that I can transfer via sftp.
Is there a way of doing this efficiently without reading them into memory?
At the moment I'm working with the following code, but this maxes out the memory before writing the file. Any thoughts are much appreciated.
library(tidyverse)
library(data.table)
df <- list.files(pattern = ".rds") %>%
map(readRDS) %>%
data.table::rbindlist()
saveRDS(df,"df.rds")
Eventually I read in one by one and used read::write_csv("name.csv",append=TRUE) to append them on disk. After that I use {disk.frame} or SQL database to process the data.