Map data variables to visual encodings

enc(x, y, ...)

Arguments

x, y, ...

A set of name-value pairs to describe the mappings of data variables to visual encodings in vega() and individual mark layers mark_*(). Use NULL to disable a layer encoding to inherit from its parent encodings.

Value

A list of quosures or constants.

Examples

enc(x = mpg, y = wt)
#> <list_of<quosure>> #> #> $x #> <quosure> #> expr: ^mpg #> env: 0x7fc8221a8c40 #> #> $y #> <quosure> #> expr: ^wt #> env: 0x7fc8221a8c40 #>
enc(colour = cyl)
#> <list_of<quosure>> #> #> $color #> <quosure> #> expr: ^cyl #> env: 0x7fc8221a8c40 #>
enc(color = cyl)
#> <list_of<quosure>> #> #> $color #> <quosure> #> expr: ^cyl #> env: 0x7fc8221a8c40 #>
enc(x = NULL)
#> <list_of<quosure>> #> #> $x #> <quosure> #> expr: ^NULL #> env: empty #>