Closed
Description
It would be neat to be able to use the same "short" version of defining function as in purrr
in ggplot2
as well.
Example would be to be able to write:
ggplot(mtcars, aes(drat, qsec)) +
geom_line() +
scale_y_continuous(labels = ~format(., nsmall = 1))
Today you need to do like this:
ggplot(mtcars, aes(drat, qsec)) +
geom_line() +
scale_y_continuous(labels = function(x) format(x, nsmall = 1))
Thanks! :)