save a fit from a regression

Hello

I would like to know how to save a fit from a previous R session.
For example, imagine today i run :
fit <- lm( Y ~ X1 + X2, data = DATA)
and i want to save it somewhere to call directly fit without running the regression. What is the best choice?
Thank you.

save(fit,"myFit.RData")

Then later

load("myFit.RData")
2 Likes

Thanks a lot, please let me try it tomorrow but i'm sure it's the solution !

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.