data.frame
s, lm
s, (including glm
s).mplot(object, ...)## S3 method for class 'default':
mplot(object, ...)
## S3 method for class 'lm':
mplot(object, which = c(1:3, 7), system = c("lattice",
"ggplot2", "base"), ask = FALSE, multiplot = "package:gridExtra" %in%
search(), par.settings = theme.mosaic(), level = 0.95,
title = paste("model: ", deparse(object$call), "\n"), rows = TRUE, ...)
## S3 method for class 'data.frame':
mplot(object, format, default = format,
system = c("lattice", "ggplot2"), show = FALSE, title = "", ...)
## S3 method for class 'summary.lm':
mplot(object, system = c("lattice", "ggplot2"),
level = 0.95, par.settings = trellis.par.get(), rows = TRUE, ...)
## S3 method for class 'TukeyHSD':
mplot(object, system = c("lattice", "ggplot2"),
ylab = "", xlab = "difference in means",
title = "Tukey's Honest Significant Differences",
par.settings = trellis.par.get(), ...)
object
is an lm
, subsets
of these arguments are passed to grid.arrange
and to the
nrow
and ncol
can be used to ask == FALSE
, all plots will be
displayed together.TRUE
(for all rows), or a character vector of row names."scatter"
,
"jitter"
,
"boxplot"
,
"violin"
,
"histogram"
,
"density"
,
"frequency polygon"
,
"xyplot"
,
or
"map"<
TRUE
, the code will be displayed each time the plot is
changed.<
if (require(mosaicData)) {
mplot( lm( width ~ length * sex, data=KidsFeet) )
mplot( lm( width ~ length * sex, data=KidsFeet), rows=2:3, which=7 )
}
if (require(mosaicData)) {
mplot( HELPrct )
mplot( HELPrct, "histogram" )
}
if (require(mosaicData)) {
mplot(summary(lm(width ~ length * sex, data=KidsFeet)), system="ggplot")
mplot(summary(lm(width ~ length * sex, data=KidsFeet)), rows=c("sex", "length"))
mplot(summary(lm(width ~ length * sex, data=KidsFeet)), rows=TRUE)
}
if (require(mosaicData)) {
mplot(TukeyHSD( lm(age ~ substance, data=HELPrct) ) )
mplot(TukeyHSD( lm(age ~ substance, data=HELPrct) ), system="ggplot2" )
}
Run the code above in your browser using DataLab