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

Winword output suggestion #14

Open
spedygiorgio opened this issue Feb 21, 2018 · 5 comments
Open

Winword output suggestion #14

spedygiorgio opened this issue Feb 21, 2018 · 5 comments

Comments

@spedygiorgio
Copy link

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

@dcomtois
Copy link
Owner

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

@dcomtois
Copy link
Owner

dcomtois commented Feb 20, 2019

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.

@spedygiorgio
Copy link
Author

Cool I will check and tell you

@tsolloway
Copy link

tsolloway commented May 21, 2019

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?

@dcomtois
Copy link
Owner

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

3 participants