inst/snippet/cholesterol01.R

data(cholesterol, package = "multcomp")
cholesterol <- cholesterol %>% 
  mutate(trt = factor(gsub("drug", "", gsub("times*", "x", trt))))
chol.lm <- lm(response ~ trt, data = cholesterol)
plot(chol.lm, w = c(5, 2))       # diagnostic plots
msummary(chol.lm)
anova(chol.lm)

Try the fastR2 package in your browser

Any scripts or data that you put into this service are public.

fastR2 documentation built on Nov. 9, 2023, 9:06 a.m.