Aliases: plot.design
Keywords: hplot
### ** Examples require(stats) plot.design(warpbreaks) # automatic for data frame with one numeric var.
Form <- breaks ~ wool + tension summary(fm1 <- aov(Form, data = warpbreaks))
Df Sum Sq Mean Sq F value Pr(>F) wool 1 451 450.7 3.339 0.07361 . tension 2 2034 1017.1 7.537 0.00138 ** Residuals 50 6748 135.0 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot.design( Form, data = warpbreaks, col = 2) # same as above
## More than one y : utils::str(esoph)
'data.frame': 88 obs. of 5 variables: $ agegp : Ord.factor w/ 6 levels "25-34"<"35-44"<..: 1 1 1 1 1 1 1 1 1 1 ... $ alcgp : Ord.factor w/ 4 levels "0-39g/day"<"40-79"<..: 1 1 1 1 2 2 2 2 3 3 ... $ tobgp : Ord.factor w/ 4 levels "0-9g/day"<"10-19"<..: 1 2 3 4 1 2 3 4 1 2 ... $ ncases : num 0 0 0 0 0 0 0 0 0 0 ... $ ncontrols: num 40 10 6 5 27 7 4 7 2 1 ...
plot.design(esoph) ## two plots; if interactive you are "ask"ed
## or rather, compare mean and median: op <- par(mfcol = 1:2) plot.design(ncases/ncontrols ~ ., data = esoph, ylim = c(0, 0.8)) plot.design(ncases/ncontrols ~ ., data = esoph, ylim = c(0, 0.8), fun = median)
par(op)