r-lib / scales

Tools for ggplot2 scales
https://scales.r-lib.org
Other
395 stars 107 forks source link

Suggestion: better documentation for format function options #406

Open dmurdoch opened 11 months ago

dmurdoch commented 11 months ago

The scales::label_percent() function and several other formatting functions have a ... argument, documented as "Other arguments passed on to base::format()." Normally that's the way I'd document ..., but in this case, it might be worth making an exception, because ?base::format lists options, but doesn't document them, pushing the reader on to ?base::prettyNum. That page does describe the options, but it's a long way for a reader to go.

This means that some readers (including both the asker and answerer of this SO question) don't know what options are available.

I'm not sure what form the extra documentation should take; maybe a link to a vignette or web page that gives examples for all of the options?

dmurdoch commented 11 months ago

I've put a quick sample of the kind of display I had in mind online here. The source is here.