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

Calling tidy_plus_plus() arguments for tbl_regression()? #692

Closed
ddsjoberg opened this issue Oct 27, 2020 · 1 comment · Fixed by #685
Closed

Calling tidy_plus_plus() arguments for tbl_regression()? #692

ddsjoberg opened this issue Oct 27, 2020 · 1 comment · Fixed by #685

Comments

@ddsjoberg
Copy link
Owner

What is the best way allow users to pass additional arguments to tidy_plus_plus() for further customization?
Things I value in the solution (which does not need to implemented in the next release):

  • functions with few arguments
  • the majority of users have a good experience with the function and are not overwhelmed with too much information when encountering the function.
  • tables are highly customizable
  1. Allow users to set default values for tidy_plus_plus() via gtsummary theme elements.
    • Pros
      • Easily implemented
      • Can make theme_gtsummary_plus_plus(<list each additional arg to modify>) to easily modify tidy_plus_plus() arguments
      • Does not overburden new/majority of users who may not need this type of feature
      • This can be implemented now, while we decide on whether to implement other options
    • Cons
      • Writing/Saving gtsummary themes is not easy. Although, users can use an exported theme.
      • Not easily discoverable by the advanced users
  2. Add a tbl_regression(tidy_plus_plus=list(additional arg)) argument.
    • Pros
      • Will be visible to users, so advanced users can discover the option
    • Cons
      • I don't like adding more args to the function, especially for args most users may not use? But this is only one arg....
@larmarange
Copy link
Collaborator

larmarange commented Oct 27, 2020

If new options are added to broom.helpers, solution 1 will require an update in gtsummary as well, which is not the case in solution 2.

An additional thing to consider: if we develop addition experimental tidy_ functions in broom.helpers, I do not know if we should make them accessible through tidy_plus_plus() or wait that they are stable before inclusion.

For advanced users, all options of tidy_plus_plus() are also available through individual tidy_() functions.

Maybe a third option is to implement an extra_treatment argument allowing to pass a custom function that will be applied to the result of tidy_plus_plus(). It could be any broom.helpers::tidy_ function or any function developed by advanced users, so event more flexible that the current options 1 and 2.

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

Successfully merging a pull request may close this issue.

2 participants