here is an issue I have been struggling with. I am trying to automate some rather long estimations. The for loop I built for the estimations themselves works fine, but I would like to write each of the estimation results onto my drive. I really need to do this estimation by estimation as the resulting files are very large, and I cannot hold more than 3-4 in memory.
Here is an example of what I would like to do:
for (i in 1:n){
d <- da %>% filter(index == i)
h <- estimate(f(d)) #not real code; this create my output stored in h
saveRDS( h , file = "model_[i].Rda")
}
Again, this all works fine except for saving the file in the last line. Any ideas of what I could do here?
Cheers, Max