How to print out the page created from shinydashboard as shown in HTML

Hello,
I am new to shiny and shinydashboard package. I ran the following code (copied from https://rstudio.github.io/shinydashboard/get_started.html).

Can anyone tell me whether is it possible to print out the page like it is showing in web browser: with the two boxes(histogram and box of slider) on the same row? Is the grid system of shinydashboard only useful for viewing in browser?

I am using the package to produce different graphs, tables that need to be arranged in different rows and columns and then I can print them out or export them to a PDF file with a single page. Can anyone let me is this possible? If possible, will vey much appreciate let me know how?

Thanks in advance,
Jenpei

## app.R ##
library(shinydashboard)

ui <- dashboardPage(
  dashboardHeader(title = "Basic dashboard"),
  dashboardSidebar(),
  dashboardBody(
    # Boxes need to be put in a row (or column)
    fluidRow(
      box(plotOutput("plot1", height = 250), width = 6),
      box(
        title = "Controls",
        sliderInput("slider", "Number of observations:", 1, 100, 50), width = 6
      )
    )
  )
)
server <- function(input, output) {
  set.seed(122)
  histdata <- rnorm(500)
  output$plot1 <- renderPlot({
    data <- histdata[seq_len(input$slider)]
    hist(data)
  })
}
shinyApp(ui, server)

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.