scales icon indicating copy to clipboard operation
scales copied to clipboard

percent() and percent_format() superseded by label_percent(), but returns different

Open jzadra opened this issue 3 years ago • 1 comments
trafficstars

percent() and percent_format() returned formatted values, while the new function they are superseded by, label_percent() returns a function.

While this works for the labels arguments in ggplot2, it doesn't when used elsewhere (for instance in the text argument of aes(), or anywhere outside of ggplot.

Perhaps I've just been using it inappropriately...

jzadra avatar Sep 27 '22 17:09 jzadra

In my usage and when I was teaching {scales} to new R users, it always feels much more intuitive to use percent() outside of ggplot() when it's being used to to format values directly and to reserve label_percent() for use inside ggplot() and other places where a function needs to be given. It would really make the most sense to me to keep both accessible to users for their different use cases.

bwiernik avatar Oct 11 '22 18:10 bwiernik