Skip to content

Tidy evaluation #2412

@hadley

Description

@hadley

Work occurring in tidyeval branch

df <- data.frame(x = 0, y = 0)
ggplot(df, aes(x, y)) + geom_point()

z1 <- new_quosure(expr(z), env(z = 1))
z2 <- new_quosure(expr(z), env(z = 1:2))
aes(!!z1, !!z2)

ggplot(df, aes(x, y)) + geom_point()
ggplot(df, aes(!!z1, y)) + geom_point()
ggplot(df, aes(x, y)) + geom_point(aes(!!z1))

Need to figure out how to represent facetting spec using quosures

Small fixes :

  • make sure aes_() and aes_string() preserve existing interface
  • why did scales_add_defaults() need tryapply()? what breaks by removing it?
  • does using globalenv() instead of plot_env in find_scale cause problems? => tests assume find_scale can find local scales
  • test that subset still works

Metadata

Metadata

Assignees

No one assigned

    Labels

    featurea feature request or enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions