create_aes: Create Aes Mapping from a List

Description Usage Arguments Examples

View source: R/create_aes.R

Description

Create aes mapping to make programming easy with ggplot2.

Usage

1

Arguments

.list

a list of aesthetic arguments; for example .list = list(x = "dose", y = "len", color = "dose").

parse

logical. If TRUE, parse the input as an expression.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# Simple aes creation
create_aes(list(x = "Sepal.Length", y = "Petal.Length" ))

# Parse an expression
x <- "log2(Sepal.Length)"
y <- "log2(Petal.Length)"
create_aes(list(x = x, y = y ), parse = TRUE)

# Create a ggplot
mapping <- create_aes(list(x = x, y = y ), parse = TRUE)
ggplot(iris, mapping) +
 geom_point()

ggpubr documentation built on July 2, 2020, 2:12 a.m.