Constructs colour vector for model terms
termColours(f, pal = RColorBrewer::brewer.pal(4, "Set2"))
a vector of colours. Residuals are given a grey color
a model fit with term labels
use this palette
termColours(lm(mpg ~ wt+hp, data=mtcars))
Run the code above in your browser using DataLab