New to this community and thanks in advance for any help. I am just getting
started in using R for modeling and have run across the above error. This is for
a simple formula using mtcars
R dataset. Can anyone provide some suggestions to fix it?
I ran across similar questions in the archives but couldn't find a solution.
LMfit1 <-train(mtcars$mpg ~ ., data =TrainData, method = "lm")
Error in terms.formula(formula, data = data) :
'.' in formula and no 'data' argument