Skip to content
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

Error: Smallest value of scales_cut must be zero #346

Closed
PaulC91 opened this issue Apr 15, 2022 · 0 comments
Closed

Error: Smallest value of scales_cut must be zero #346

PaulC91 opened this issue Apr 15, 2022 · 0 comments

Comments

@PaulC91
Copy link

PaulC91 commented Apr 15, 2022

Hey. I was just testing out the new scale_cut argument in version 1.2.0.

The documentation suggests a named vector such as c(a = 100, b = 1000) can be supplied, however this results in an error.

Adding a 0 to the vector solves the issue, but I thought I'd let you know in case you want to update the documentation or remove the requirement for a 0 to be included in the supplied vector.

Thanks!

scales::number(1000, scale_cut = c(a = 100, b = 1000))
#> Error in `scale_cut()`:
#> ! Smallest value of `scales_cut` must be zero
scales::number(1000, scale_cut = c(0, a = 100, b = 1000))
#> [1] "1b"

Created on 2022-04-15 by the reprex package (v1.0.0)

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

No branches or pull requests

1 participant