Skip to contents

Parse aesthetic mappings to separate tf and regular aesthetics

Usage

parse_tf_aesthetics(mapping, data = NULL)

Arguments

mapping

An aesthetic mapping created with ggplot2::aes().

data

Data frame to evaluate expressions against.

Value

A list with components tf_aes, scalar_tf_aes, and regular_aes.

Examples

parse_tf_aesthetics(ggplot2::aes(tf = f, color = group))
#> $tf_aes
#> Aesthetic mapping: 
#> * `tf` -> `f`
#> 
#> $scalar_tf_aes
#> Aesthetic mapping: 
#> <empty>
#> 
#> $regular_aes
#> $colour
#> <quosure>
#> expr: ^group
#> env:  0x5649e7fd1040
#> 
#> attr(,"class")
#> [1] "uneval"
#> attr(,"S7_class")
#> <ggplot2::mapping> class
#> @ parent     : S3<gg>
#> @ constructor: function(x, ..., env) {...}
#> @ validator  : <NULL>
#> @ properties :
#> 
parse_tf_aesthetics(ggplot2::aes(x = x, y = y))
#> $tf_aes
#> Aesthetic mapping: 
#> <empty>
#> 
#> $scalar_tf_aes
#> Aesthetic mapping: 
#> <empty>
#> 
#> $regular_aes
#> $x
#> <quosure>
#> expr: ^x
#> env:  0x5649e7fd1040
#> 
#> $y
#> <quosure>
#> expr: ^y
#> env:  0x5649e7fd1040
#> 
#> attr(,"class")
#> [1] "uneval"
#> attr(,"S7_class")
#> <ggplot2::mapping> class
#> @ parent     : S3<gg>
#> @ constructor: function(x, ..., env) {...}
#> @ validator  : <NULL>
#> @ properties :
#>