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

Export keys.as.row.names to panderOptions #355

Open
connorp opened this issue Feb 22, 2022 · 1 comment
Open

Export keys.as.row.names to panderOptions #355

connorp opened this issue Feb 22, 2022 · 1 comment

Comments

@connorp
Copy link

connorp commented Feb 22, 2022

I call pander implicitly in my Rmarkdown documents by setting df_print: !expr pander::pander in my YAML header. This mostly works well, as I just set options to modify pander's behavior using panderOptions. However, not every option is available. In particular, keys.as.row.names is not available to set via panderOptions. Could that be added as a globally settable option?

@daroczig
Copy link
Member

I'd be open to a PR on this, but my concern is that there are many other options in the S3 methods that are not available via panderOptions, so it would be quite a lot of work to support all, and/or decide which params to extract to panderOptions.

That approach could also use a refactor .. it was written almost 10 yrs ago 😅
Today I would probably do that in another way.

Anyway, to be more constructive, what about a wrapper helper function for your exact use case and call that in df_print?

pander2 <- function(x, ...) pander::pander(x, keys.as.row.names = FALSE, ...)

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

2 participants