Sample code:
require(datasets); data(InsectSprays)model1 <- lm(count ~ spray, data = InsectSprays) summary(model1)
When I run above code, the result is
However, the levels of spray is not 1,2,3,4,5, they are
I wonder how to display spray1/2/3/4/5 as sprayB/C/D/E/F? I saw other people can get the one showing what I want(display the true levels) with the same code see here: