I am trying to distinguish between a LM object and a RLM (robust LM from MASS) because depending on which type of regression is I want to perform one thing or another. So fitList can be either a lm or a rlm model, being all the elements of the list the same type.
fitList as a list of several normal linear models:
Output: lm(formula = frmla, data = xList[[i]])
Output: rlm(formula = frmla, data = xList[[i]], method = "MM")
library(MASS) fitlm <- lm(Height ~., trees) fitrlm <- rlm(Height ~., trees) class(fitlm) class(fitrlm)