Skip to content

Fallback for dir = 'h'/'v' #5907

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 4, 2024
Merged

Conversation

teunbrand
Copy link
Collaborator

This PR aims to fix #5898 and replaces #5900.

Briefly, it is not as.table that we need to preserve, but old-style dir = 'h'/'v' need to be translated.
This PR has a fallback for these old options and soft-deprecates their use.

Developers might see the following in their testthat runs:

devtools::load_all("~/packages/ggplot2")
#> ℹ Loading ggplot2
library(deeptime)

options(lifecycle_verbosity = "warning")

df <- data.frame(x = 1:10, y = 1:10, period = c("Permian", "Triassic"))
ggplot(df) +
  geom_point(aes(x, y)) +
  facet_wrap_color(vars(period), colors = periods)
#> Warning: Internal use of `dir = "h"` and `dir = "v"` in `facet_wrap()` was deprecated in
#> ggplot2 3.5.2.
#> ℹ The `dir` argument should incorporate the `as.table` argument.
#> ℹ Falling back to `dir = "lt"`.
#> Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
#> generated.

Created on 2024-05-24 with reprex v2.1.0

@teunbrand teunbrand mentioned this pull request May 24, 2024
Copy link
Member

@thomasp85 thomasp85 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@teunbrand teunbrand merged commit 8f3a4ba into tidyverse:main Jun 4, 2024
11 checks passed
@teunbrand teunbrand deleted the warn_missing_as_table branch June 4, 2024 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fallback for facet_wrap(as.table)
2 participants