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

Issue with label_number(accuracy = 0.1, scale_cut = cut_short_scale()) #449

Open
rawktheuniversemon opened this issue Sep 24, 2024 · 1 comment

Comments

@rawktheuniversemon
Copy link

Hi everyone, i have a list of numbers that I need to give proper formatting, but i noticed it was giving me error so I started testing out the function using random number. Results below:

Scenario that worked:
label_number(accuracy = 0.1, scale_cut = cut_short_scale())(c(1998293, 19938123121, 29381123127, 3992841))
[1] "2.0M" "19.9B" "29.4B" "4.0M"

Scenario that gives error:
label_number(accuracy = 0.1, scale_cut = cut_short_scale())(c(1998293, 199381, 293817, 3992841))
Error in break_suffix[bad_break][improved_break & !power10_break] <- names(lower_break[improved_break & :
NAs are not allowed in subscripted assignments

I tried using multiple other cases with decimals, and the error seems to be random (i.e. sometimes it generates number whereas sometimes it shows error).

Is that something that can be resolved within the function? Or is there any limitation when using the function? Looking forward to your reply.

@teunbrand
Copy link
Contributor

This is a known bug originally reported in #413

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

2 participants