library(shiny) ui <- shinyUI(fluidPage( titlePanel("Geisri andmed"), sliderInput("bins","Jaotiste arv:", min = 1, max = 50, value = 30) , plotOutput("distPlot") )) server <- shinyServer(function(input, output) { output$distPlot <- renderPlot({ x <- faithful[, 2] bins <- seq(min(x), max(x), length.out = input$bins + 1) hist(x, breaks = bins, col = 'darkgray', border = 'white', main="Ooteaegade jaotus", xlab="Sekundid", ylab="Sagedus", xlim=c(40, 100)) }) }) shinyApp(ui = ui, server = server)