<div class="box box-solid box-warning">server <- function(input, output) { output$distPlot <- renderPlot({ hist(rnorm(input$obs), col = 'darkgray', border = 'white') })}ui <- fluidPage( sidebarLayout( sidebarPanel( sliderInput("obs", "Number of observations:", min = 10, max = 500, value = 100) ), mainPanel( box(title = "Histogram",status = "warning", solidHeader = TRUE, plotOutput("distPlot") )) ))
shinyApp(ui = ui, server = server)
server <- function(input, output) {
output$distPlot <- renderPlot({
hist(rnorm(input$obs), col = 'darkgray', border = 'white')
})
}
ui <- dashboardPage(
dashboardHeader(),
dashboardSidebar(
sliderInput("obs", "Number of observations:", min = 10, max = 500, value = 100)),
dashboardBody(
box(title = "Histogram",status = "warning", solidHeader = TRUE,
plotOutput("distPlot")
)
)
)
)
shinyApp(ui = ui, server = server)