data(iris)
model_lm <- caret::train(Sepal.Length ~ .,
data = iris,
method = "lm"
)
model_rf <- caret::train(Sepal.Length ~ .,
data = iris,
method = "rf",
tuneLength = 1L
)
model_list <- c(model_lm, model_rf)
Run the code above in your browser using DataLab