Learn R Programming

GGally (version 1.3.2)

add_and_overwrite_aes: Add new aes

Description

Add new aesthetics to a previous aes.

Usage

add_and_overwrite_aes(current, new)

Arguments

Value

aes_ output

Examples

Run this code
# NOT RUN {
data(diamonds, package="ggplot2")
diamonds.samp <- diamonds[sample(1:dim(diamonds)[1], 1000), ]
pm <- ggpairs(diamonds.samp, columns = 5:7,
  mapping = ggplot2::aes(color = color),
  upper = list(continuous = "cor", mapping = ggplot2::aes_string(color = "clarity")),
  lower = list(continuous = "cor", mapping = ggplot2::aes_string(color = "cut")),
  title = "Diamonds Sample"
)
str(pm)

# }

Run the code above in your browser using DataLab