inst/download/ui/render_ui_sidebar_date_filtering.R

output$time_filtering_ui <- renderUI({

  if (DATE_BASED_CORPUS == TRUE) {

    shiny::tagList(
      shinyWidgets::radioGroupButtons(
        inputId = "years_or_dates",
        label = NULL,
        choices = c("Year range", "Date range"),
        justified = TRUE,
        size = "sm"
      ),

      shiny::conditionalPanel(
        condition = "input.years_or_dates == 'Year range'",
        sliderInput(
          "date_slider",
          label = NULL,
          min = min(abc$Year),
          max = max(abc$Year),
          value = range(abc$Year),
          sep = ""
        )
      ),

      shiny::conditionalPanel(
        condition = "input.years_or_dates == 'Date range'",
        shiny::dateRangeInput(
          "date_calendar",
          label = NULL,
          weekstart = 1,
          start = min(abc$Date),
          end = max(abc$Date),
          min = min(abc$Date),
          max = max(abc$Date)
        )
      ),

      hr()
    )

  }

})

Try the corporaexplorer package in your browser

Any scripts or data that you put into this service are public.

corporaexplorer documentation built on June 20, 2022, 5:20 p.m.