create_aes {ggpubr}R Documentation

Create Aes Mapping from a List

Description

Create aes mapping to make programming easy with ggplot2.

Usage

create_aes(.list, parse = TRUE)

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

# 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()


[Package ggpubr version 0.6.0 Index]