Skip to content
Prev 132524 / 398506 Next

assigning and saving datasets in a loop, with names changing with "i"

library(R.utils);

for (ii in 1:12) {
  value <- my.fun(my.list[ii]);
  saveObject(value, file=sprintf("data%02d.RData", ii));
  rm(value); gc();
}

for (ii in 1:12) {
  value <- loadObject(sprintf("data%02d.RData", ii));
}
On 18/12/2007, Marie Pierre Sylvestre <MP.Sylvestre at epimgh.mcgill.ca> wrote: