humap: Create a humap, ready for plotting a geom

Description Usage Arguments Value

View source: R/humap.R

Description

humap sets up a ggplot object with theme settings appropriate for adding geoms from the humapr package. A ggplot object, it's compatible with standard ggplot2 function, e.g., theme() and facet_wrap(). Doesn't really do anything on its own.

Usage

1
humap(data = NULL, mapping = NULL)

Arguments

data

data frame, like the type you'd feed into ggplot() when producing a histogram. Is expected to be tidy, but can contain a summary statistic; in that case, you must specify a fill aesthetic and set stat = "identity" in the call to the geom.

mapping

aes() object, just like other ggplot2 functions, with two aesthetics: loc is the name of the data frame column containing localisation codes for observations; and side the column holding the laterality data (must be either "left" or "right, but see bridge_side). It is possible to supply a fill argument to use pre-computed summary statistics (see below).

Value

A ggplot object with suitable layout settings for the purpose of humap_body.


benskov/humapr documentation built on April 3, 2021, 6:52 a.m.