set_aes: Set the aesthetics mapping

Description Usage Arguments Examples

Description

Turns a mapping that contains named and unnamed aesthetics into a vector with all aesthetics named according to the argument structure of ggplot2::aes(), which is aes(x, y, ...). This may be used down-stream. E.g. for violin plots, the aesthetics x and y are not interchangeable and it is unsafe to assume that x is always the first aesthetic. Hence, by creating a named vector, we can always refer to the aesthetics by name.

Usage

1
set_aes(aes, names_data)

Arguments

aes

The aesthetics to map.

names_data

The names of all columns.

Examples

1
simplificar:::set_aes(c(y = "cyl", "vs"), names(mtcars))

lorenzwalthert/simplificar documentation built on May 7, 2019, 9:32 a.m.