yutannihilation / gghighlight

Highlight points and lines in ggplot2

Home Page:https://yutannihilation.github.io/gghighlight/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

yutannihilation opened this issue · comments

(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)