Hard to tell what, exactly, without a full reprex
. See the FAQ: How to do a minimal reproducible example reprex
for beginners
Use
str(train)
to see which variables are factors and to check that they all have at least two levels. If some are missing a level run the model with express arguments excluding those, rather than using the catch-all .
lm(price ~ fee + fi + fo + fum, data = train ...