The following is rendered as an html output in my shiny application and I'd like the user to be able to print or save this document from the ui as a pdf or word. Any suggestions how to do this?
library(shiny)
ui <- fluidPage(
mainPanel(
htmlOutput("summary")
)
)
server <- function(input, output) {
output$summary <- renderUI({
x1 <- c("T", "T", "T", "T", "T", "T", "F", "F", "F", "N")
x2 <- c("A", "A", "A", "A", "A", "A", "A", "A", "A", "A")
x3 <- c(1,2,3,4,5,6,7,8,9,10)
x4 <- c(1,2,3,4,5,6,7,8,9,10)
d <- data.frame(x1,x2,x3,x4)
out <- print(arrange(dfSummary(d, round.digits = 3, max.distinct.values = 5), Variable), headings = FALSE, method = 'render', valid.col = F, footnote = "", bootstrap.css = FALSE)
})
}
shinyApp(ui = ui, server = server)
thank you