-
Notifications
You must be signed in to change notification settings - Fork 117
Closed
Labels
bugan unexpected problem or unintended behavioran unexpected problem or unintended behavior
Description
The label_number family of functions have a default value of accuracy = NULL. According to the documentation, this:
uses a heuristic that should ensure breaks have the minimum number of digits needed to show the difference between adjacent values.
Unfortunately, it seems this heuristic can fail under certain conditions. Here's an example:
> scales::comma(c(Inf, 1, Inf, 0))
Error in if (smallest_diff < sqrt(.Machine$double.eps)) { :
missing value where TRUE/FALSE neededIt looks like the problem stems from the underlying scales::number function:
> scales::number(c(Inf, 1, Inf, 0))
Error in if (smallest_diff < sqrt(.Machine$double.eps)) { :
missing value where TRUE/FALSE neededMetadata
Metadata
Assignees
Labels
bugan unexpected problem or unintended behavioran unexpected problem or unintended behavior