Skip to content

Can a non-symbol aes be accepted as a group key? #151

@yutannihilation

Description

@yutannihilation

(originally reported here: http://disq.us/p/29t184a)

library(gghighlight)
#> Loading required package: ggplot2

d1 <- data.frame(x = 1:10, y =  1:10)
d2 <- data.frame(x = 1:10, y = 11:20)

ggplot(mapping = aes(x, y)) +
  geom_line(data = d1, aes(colour = "d1")) +
  geom_line(data = d2, aes(colour = "d2")) +
  gghighlight()
#> Error: `quo` must be a quosure

Created on 2020-06-09 by the reprex package (v0.3.0)

The error occurs here:

gghighlight/R/gghighlight.R

Lines 280 to 281 in 7cc7b3d

# for group key, use symbols only, and don't include extra_vars
group_keys <- purrr::keep(mapping[group_cols], quo_is_symbol)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions