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

dplyr warning

yutannihilation opened this issue · comments

library(ggplot2)
library(gghighlight)

d <- data.frame(
  idx = c(1, 2, 3, 4, 1, 2, 3, 4),
  value = c(10, 11, 12, 13, 4, 8, 16, 32),
  cat1 = rep(c("a", "b"), each = 4),
  cat2 = rep(rep(c("1-2", "3-4"), each = 2), 2),
  stringsAsFactors = FALSE
)

p <- ggplot(d, aes(idx, value, colour = cat1)) +
  geom_line() +
  facet_wrap(vars(cat2))

p +
  gghighlight(max(value) > 10)
#> Warning: The `...` argument of `group_keys()` is deprecated as of dplyr 1.0.0.
#> Please `group_by()` first
#> This warning is displayed once every 8 hours.
#> Call `lifecycle::last_warnings()` to see where this warning was generated.
#> label_key: cat1