scales icon indicating copy to clipboard operation
scales copied to clipboard

Suggestion: better documentation for format function options

Open dmurdoch opened this issue 2 years ago • 1 comments
trafficstars

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 avatar Nov 05 '23 19:11 dmurdoch

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

dmurdoch avatar Nov 05 '23 21:11 dmurdoch