Last chance! 50% off unlimited learning
Sale ends in
ref
is first and the others are moved down. This is useful
for contr.treatment
contrasts which take the first level as
the reference.
relevel(x, ref, ...)
x
.
factor
, contr.treatment
,
levels
, reorder
.
warpbreaks$tension <- relevel(warpbreaks$tension, ref = "M")
summary(lm(breaks ~ wool + tension, data = warpbreaks))
Run the code above in your browser using DataLab