facettize: Flexible plot facetting

Description Usage Arguments Details Value

View source: R/facettize.R

Description

Customized facetted plot

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
facettize(
  p,
  rows = NULL,
  cols = NULL,
  wrap = FALSE,
  prepend = NULL,
  append = NULL,
  parsed = NULL,
  header = NULL,
  sep = " = "
)

Arguments

p

A ggplot

rows

Optional variables to facet by rows

cols

Optional variables to facet by columns

wrap

If TRUE, 'facet_wrap' is used instead of 'facet_grid', so columns and rows are irrelevant

prepend, append

Optional character strings to prepend or append to the labels, respectively. Can be either of (1) an unnamed character string that will be recycled over all facetting variables, (2) an unnamed character vector that must be of the same length as there are facetting variables (rows first, columns second), or (3) a named character vector where names refer to the faccetting variables to apply each character string.

parsed

Optional names of the facetting variables that should have their labels parsed. See '?bquote' and the 'plotmath' syntax documentation for how the labels should be formatted if they are parsed into mathematical expressions.

header

Optional names of facetting variables to which to prepend their own column names. Overwrites 'prepend', if any.

sep

Separator to use when prepending a 'header'.

Details

Flexible tool for making facetted plots in various layouts and with various facet labels.

Value

A facetted ggplot


rscherrer/ggfacet documentation built on May 7, 2021, 11:40 a.m.