-
Notifications
You must be signed in to change notification settings - Fork 130
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
Feature request: adorn_n_formatting() #444
Comments
Thanks for this suggestion. I was on the fence about #378 and it sounds like this is a vote for implementing that. I think the formatting would have to be part of What do you think about a new argument to |
Apologies, I did try to avoid a duplicate request but didn't find #378 - yes that's very much the same requirement. I understand your point about amending the formats after the adorn so yes, another approach would be to support the format() function as a ... pass through of adorn_ns(). This is how pandoc.table in the pander package does this and it works well. I think I'm arguing for a way to do this all inline and without repetition rather than requiring another step - also for consistency with standard elements of the tidyverse as a consistent design philosophy. My problem with defining a function would be that it's another step - passing through the format() elements seems more elegant and consistent. |
Has this been implemented yet? |
Hi. Sorry my engagement is sporadic. I edited my comment above to show what it would look like in-line. I think we agree it should be part of |
Consolidating into one issue, the use case stated in #459 was:
|
Just here to say adding the |
Alright I'm gonna try to sneak this in to 2.2 I think ... |
* implement format_func from #444 * specify namespace for dplyr::desc
@Thyrisis @Chanelle280 @davidbudzynski @rasmusrhl this is now merged into the main branch! If you're interested in taking it for a spin, there's a short window in which I could act on any feedback before submitting the next version to CRAN. Otherwise of course I'd still like your feedback on how I implemented it, at any time. |
Looks good to me, thanks for your work on this! |
Looks great! Thanks for working on this. We use tabyl all the time and this will make our work a lot easier when we also include percentages. |
I need to present numbers as well as percentages in many tables I create with tabyl() and since those numbers can be large, they need to be formattable - with either commas or dots for legibility.
I know this is possible by pre-formatting and use of the ns argument in adorn_ns() but I suggest making this simpler and more consistent with the existing adorn_pct_formatting() by adding a new function - adorn_n_formatting(). This would also avoid the need to create multiple output objects in multiple steps.
I suggest the arguments for this could include big.mark to be consistent with other packages existing syntax.
Proposed code example
Comparable current code example
The text was updated successfully, but these errors were encountered: