I want to put my whole code inside the action button. As i click the button my whole code dashboard should be visible in my screen(which i am getting right now in my code) But firstly i must be able to see only that button.
Here is the sample dashboard which i am trying to put in my button. I have not make the button in this code as this is quite straight forward.Can somebody help please?
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)),
box(
title = "Controls",
sliderInput("slider", "Number of observations:", 1, 100, 50)
)
)
)
)
server <- function(input, output) {
set.seed(122)
histdata <- rnorm(500)
output$plot1 <- renderPlot({
data <- histdata[seq_len(input$slider)]
hist(data)
})
}
shinyApp(ui, server)