The plot() method for the datawizard::means_by_group() function.
Usage
# S3 method for class 'see_dw_groupmeans'
plot(x, title = "", ci = TRUE, caption = TRUE, flip = TRUE, ...)Arguments
- x
An object returned
datawizard::means_by_group().- title
String, can be used to specify a plot title.
- ci
Logical, indicating if the confidence intervals should be included in the graph.
- caption
Logical, indicating if a caption summarizing the anova results for the analysis should be included.
- flip
Logical. If
TRUE(the default), the groups are on the vertical axis. IfFALSE, the groups are on the horizontal axis.- ...
Currently not used.
Details
Produces a faceted plot when there is more than one means-table.
By default, the plot uses ggplot2::coord_flip(), so the groups are on the
vertical axis and the means are on the horizontal axis. Use flip = FALSE
to show the groups on the horizontal axis.
Examples
if (FALSE) { # \dontrun{
group_means_object <- datawizard::means_by_group(iris$Sepal.Width, iris$Species)
plot(group_means_object, title = "group means", ci = FALSE, caption = FALSE)
group_means_object <- datawizard::means_by_group(
iris,
c("Sepal.Width", "Petal.Width"),
"Species"
)
plot(group_means_object, title = "group means")
} # }
