jashall.blogg.se

Rstudio shiny app
Rstudio shiny app











We need to toggle between two options, so we can use either radio buttons or a select box. We'll learn more about the different input options in Section 3. We can add another input widget to let the user switch between plotting eruption time and wait time. You just have to change one word in ggplot() and update the x-axis label. Try plotting the eruption time ( eruptions) instead of the waiting time. Play with the slider and watch the histogram change. # Show a plot of the generated distribution mainPanel ( plotOutput ( "distPlot" ) ) ) ) # Define server logic required to draw a histogram server <- function ( input, output ) # Run the application shinyApp (ui = ui, server = server )Ĭlick on Run App in the top right corner of the source pane. # Sidebar with a slider input for number of bins sidebarLayout ( sidebarPanel ( sliderInput ( "bins",

rstudio shiny app rstudio shiny app

# Find out more about building applications with Shiny here: # library ( shiny ) # Define UI for application that draws a histogram ui <- fluidPage ( # Application title titlePanel ( "Old Faithful Geyser Data" ),

rstudio shiny app

You can run the application by clicking # the 'Run App' button above.













Rstudio shiny app