Open ymer opened 5 years ago
In summarytools, made the transition from the method used in pander to the one you suggest. If anyone wants to work on it, I think this would be a good basis. Note that it supports the "legacy" way of settings options, too.
https://github.com/dcomtois/summarytools/blob/dev-current/R/st_options.R
Sorry for the late reply, did not really have time to work on pander
recently -- but planning to spend more time on this in 2019 and probably release v1.0 with quite some refactoring and cleaning up these legacy issues (with potentially with some minor breaking changes as well). Until then, you could try something like
multiPanderOptions <- function(...) {
options <- list(...)
for (i in seq_along(options)) {
panderOptions(names(options)[i], options[[i]])
}
}
multiPanderOptions(digits = 5, decimal.mark = ',', 5)
Is there a way to set multiple pander options in the same command? I feel it clutters the code to have 3+ lines of panderOptions commands.