title: Shiny set selected in selectInput according to URL parameter?
body: <p>Here is my small application, I want to get the parameter from the URL and assign it to <code>selected</code> parameter inside <code>selectInput</code> function:</p>
  
  <pre><code>library(shiny)
  ui &lt;- fluidPage(
    selectInput("timezone_offset", "Timezone: UTC", choices = -12:14, selected = query[["my_param"]]),
  )
  
  server &lt;- function(input, output, session) {
    query &lt;- parseQueryString(session$clientData$url_search)
  }
  
  shinyApp(ui = ui, server = server)
  </code></pre>
  
  <p>Please advise how can I do this?</p>