summarytools
summarytools copied to clipboard
Winword output suggestion
Thanks again for your great package. Is it possible to add some suggestion on how to render the output in word or html using rmarkdown in RStudio? Best
You're welcome! :)
I'll try to find some time to do so, but meanwhile I'd suggest taking a look at the source (.Rmd) files in the repo's vignettes folder, along with the rendered results (for which you'll find links at the top of the main page).
Cheers
I finally (a year later, sorry!) explored a bit more the generation of Word documents from .Rmd docs. It seems that the recommendations from the vignette also apply to these, minus the ones using "html rendering". I added a comment to this effect at the end of the vignette. If you've found useful combinations of options, feel free to share them here and I'll include them in the next release of the package/vignette.
Cool I will check and tell you
html solution...
ui <- fluidPage(
downloadButton('downloadReport')
)
server <- function(input, output, session) {
output$downloadReport <- downloadHandler(
"summary table.html",
function(file) {
file_location <- "~/temp_table.html"
print(summarytools::dfSummary(iris), file = file_location)
file_object = readLines(file_location)
file.remove(file_location)
writeLines(file_object, file)
}
)
}
shinyApp(ui, server)
Anyone have a solution that doesn't involve writing and reading?
Just some reference links... if it can help!
https://bookdown.org/yihui/rmarkdown/word-document.html
https://rmarkdown.rstudio.com/formats.html