plot_design: Plot design

Description Usage Arguments Value Methods (by generic) Examples

View source: R/plot_design.R

Description

Plots the specified within and between design. See vignette("plots", package = "faux") for examples and details.

Usage

1
2
3
4
5
6
7
plot_design(x, ..., geoms = NULL, palette = "Dark2", labeller = "label_value")

## S3 method for class 'design'
plot(x, ...)

## S3 method for class 'faux'
plot(x, ...)

Arguments

x

A list of design parameters created by check_design() or a data tbl (in long format)

...

A list of factor names to determine visualisation (see vignette) in the order color, x, facet row(s), facet col(s)

geoms

A list of ggplot2 geoms to display, defaults to "pointrangeSD" (mean ± 1SD) for designs and c("violin", "box") for data, options are: pointrangeSD, pointrangeSE, violin, box, jitter

palette

A brewer palette, defaults to "Dark2" (see ggplot2::scale_colour_brewer)

labeller

How to label the facets (see ggplot2::facet_grid). "label_value" is used by default.

Value

plot

Methods (by generic)

Examples

1
2
3
4
5
6
7
within <- list(time = c("day", "night"))
between <- list(pet = c("dog", "cat"))
des <- check_design(within, between, plot = FALSE)
plot_design(des)

data <- sim_design(within, between, plot = FALSE)
plot_design(data)

faux documentation built on Sept. 14, 2021, 1:08 a.m.