1

I conduct a large number of regression analyses using ols and cph (different models, sensitivity analyses etc) which takes on my computer around two hours. Therefore, I would like to save these models so that I don't have to re-run the same analyses every time I want to work with them. The models all have very structured names, so I can create a list of names as follows:

model.names <- list()[grep("^im", ls())

But how can I use this to save those models? Could they be placed into a data frame?

user169605
  • 141
  • 8

1 Answers1

0

I think you are looking for save()

save writes an external representation of R objects to the specified file. The objects can be read back from the file at a later date by using the function load or attach (or data in some cases).

vanao veneri
  • 880
  • 2
  • 12
  • 30