I know that R automatically creates dummy variables from categorical values, but it also automatically chooses the reference value (I think alphabetically?). How do I specify a different value to be the reference without changing the names of the values? I realize I could probably relabel the factors a,b,c... in the order I prefer, but that seems kind of kludgey to me.
Just to be clear, I'll make up an example. Let's say the factor is color and the values are red, blue, green, and yellow.
mod.lm <- lm(preference ~ color, data = flowers)
The intercept in this case would be for the case color = blue, but I want to make it yellow. How would I go about doing that?