Вы пытались определить fd как список?
fd <- list()
Также в приведенном выше примере у вас есть ошибка.Это должны быть «имена файлов», а не «файл».
Вот результат, который работал для меня:
fd <- list()
file <- list.files(pattern=".csv$")
#file creates a list of csv file names
for (i in seq_along(file))
{
fd[i]<- read.csv(file[i])
#read each csv file
output = c("o1.RDS","o2.RDS","o3.RDS")
#save each csv file as RDS every iteration,
#with the name as specified in the vector output.
saveRDS(fd[i], file = output[i])
}