Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion: better documentation for format function options #406

Open
dmurdoch opened this issue Nov 5, 2023 · 1 comment
Open

Suggestion: better documentation for format function options #406

dmurdoch opened this issue Nov 5, 2023 · 1 comment

Comments

@dmurdoch
Copy link

dmurdoch commented Nov 5, 2023

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
Copy link
Author

dmurdoch commented Nov 5, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant