getLightFit: Makes Lighter Fitted Object
Description
Makes a lighter version of a fitted object by removing elements containing data. Details
Most of the space used by a fitted object is not necessary for
prediction. This concerns, for instance, the "residuals", "effects",
"fitted.values", and "model" entries of a linear model fitted by
lm
. These entries can thus be removed from the object without
affecting the model predictions. This function is currently only
implemented for fitted objects that derive from class 'lm' or 'rpart'. It
is mainly for internal use.