I would like to read and store data using a forloop, I see that most of the code is working, I could generate the file names with the forloop however the data is not being stored and the error is occured.
info <- mixedsort(list.files())
dat <- info
length(info)
x <- 0
for (info in 1:length(dat)) {
gfg <- dat[info]
gfg_numbers <- regmatches(gfg, gregexpr("[[:digit:]]+", gfg))
p <- as.numeric(unlist(gfg_numbers))
fno <- p[4]
#print(fno)
ext <- paste("2022-11-14","spc",fno,".rds", sep = "")
print(info)
print(ext)
x <- readRDS(ext)
}
Any help would be appreciated! Thanks in ADVANCE!