I have multiple rds files that I would like to merge. I am using the following code but i get the error :
Error in readRDS(x) :
embedded nul in string: '`$\t`$!`$<`%\0`$8`$>, `$-`$>`$0`$$'
Code:
require(data.table)
files = list.files(pattern = '^2020_01_[0-9]{2}_[0-9]{2}_[0-9]{2}_[0-9]{2}\\.rds$')
dat_list = lapply(files, function (x) data.table(readRDS(x)))
dat = rbindlist(dat_list, fill = TRUE)
I am using a Windows system. When I run the same code with the same files in a Mac system, it works.