-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Some values returned by bquote()
trigger errors (3.5.1.9000)
#6384
Comments
Thanks for the report with the examples! I can reproduce this on my end. I don't think ggplot2 advertises somewhere that |
I think the trouble is coming from x <- bquote("Efficiency"~(mi~gl^{-1}))
rlang::is_formula(x)
#> [1] TRUE Created on 2025-03-27 with reprex v2.1.1 The fix might be very simple by just checking for a one-sided (LHS) formula instead of any-sided formula. Is there ever a reason to use |
The current situation is that |
I'm going to keep the issue open to keep track of it, in case #6385 doesn't get merged :) |
@teunbrand
Thanks for your dedication to 'ggplot2'. I can see lots of nice and useful enhancements coming!
The new support in (== 3.5.1.9000) of lambdas as arguments to paprameter
name
of scales breaks support for some calls as returned bybquote()
. Expressions still work as before, as works converting the value returned bybquote()
withas.expression()
. The culprit seems to be specific tilde characters triggering an attempt to interpret the call as a lambda or formula. First reprex below is for 3.5.1.9000 from R-Universe (183e7ad) and the second for 3.5.1 from CRAN. (I haven't tested all possibilities, but hopefully this reprex provides a hint of what could be the problem.)Additionally 'gganimate' supports calls but not expressions. See 'gganimate' issue #590.
3.5.1.9000
Created on 2025-03-27 with reprex v2.1.1
3.5.1
Created on 2025-03-27 with reprex v2.1.1
The text was updated successfully, but these errors were encountered: