library(shiny) library(tidyverse) ui <- fluidPage( titlePanel("Pursete ajaline jaotus"), sliderInput("bins", "Tulpade arv:", min = 1, max = 30, value = 20), mainPanel(plotOutput("distPlot")) ) server <- function(input, output) { output$distPlot <- renderPlot({ faithful %>% ggplot(aes(waiting)) + geom_histogram(bins=input$bins) }) } shinyApp(ui = ui, server = server)