Sorry for this novice question: if I fit a lm() model or loess() model, and save the model somewhere in a file or in database, for later using by third party with predict() method, do I have to save the entire model object? Since returned model object contains orginal raw data, this returned object can be huge.
+6
A:
If you include the argument model = FALSE
(it's true by default) when fitting the model, the model frame that was used will be excluded from the resulting object. You can get an estimate of the memory that is being used to store the model object giving:
object.size(my_model)
gd047
2010-05-28 14:43:10
Nice to know, thanks.
Tal Galili
2010-05-28 20:11:54