Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- library(shiny)
- # Define UI for application that draws a histogram
- ui <- fluidPage(
- # Application title
- titlePanel("Testing app"),
- # Sidebar with a slider input for number of bins
- sidebarLayout(
- sidebarPanel(
- sliderInput("Year",
- "Select year:",
- min = as.Date("2012-01-01"),
- max = as.Date("2013-01-01"),
- value = as.Date("2012-01-01"),
- timeFormat = "%Y",
- step = 365,
- animate = animationOptions(interval = 1000))
- ),
- # Show a plot of the generated distribution
- mainPanel(
- textOutput("sampleText")
- )
- )
- )
- # Define server logic required to draw a histogram
- server <- function(input, output) {
- output$sampleText <- renderText({
- paste0("You have selected: ",input$Year)
- })
- }
- # Run the application
- shinyApp(ui = ui, server = server)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement