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

Warning: Using `across()` in `filter()` is deprecated, use `if_any()` or `if_all()`

yutannihilation opened this issue · comments

Originally reported at #122 (comment)

library(gghighlight)
#> Loading required package: ggplot2

d <- data.frame(
  idx = c(1, 1, 1, 2, 2, 2, 3, 3, 3),
  value = c(1, 2, 3, 10, 11, 12, 9, 10, 11),
  category = rep(c("a", "b", "c"), 3),
  stringsAsFactors = FALSE
)

# Highlight the lines whose max values are larger than 10
ggplot(d, aes(idx, value, colour = category)) +
  geom_line() + gghighlight(max(value) > 10)
#> Warning: Using `across()` in `filter()` is deprecated, use `if_any()` or
#> `if_all()`.
#> label_key: category

Created on 2022-03-23 by the reprex package (v2.0.1)

Lord, that was fast. Thanks ;)