title: make list for shiny dropdown selectInput
body: <p>the shiny selectInput widget requires a named list of choices in this format:</p>
  
  <pre><code>choices = list(
    "mpg" = 1,
    "cyl" = 2,
    "disp" = 3,
    "hp" = 4
    # ..... etc
  )
  </code></pre>
  
  <p>the data frames going to my shiny app will not have the same variable names, so I would like to generate the names list on the fly. </p>
  
  <p>here is an attempt:</p>
  
  <pre><code>data(mtcars)
  
  choices = data.frame(
    var = names(mtcars),
    num = 1:length(names(mtcars))
  )
  
  &gt; head(choices)
     var num     mylist
  1  mpg   1  "mpg" = 1
  2  cyl   2  "cyl" = 2
  3 disp   3 "disp" = 3
  4   hp   4   "hp" = 4
  5 drat   5 "drat" = 5
  6   wt   6   "wt" = 6
  
  paste(choices$mylist, collapse = ",")
  </code></pre>
  
  <p>this looks close but it does not work:</p>
  
  <pre><code>...
  box(
          selectInput(
            "select",
            label = h3("Select box"),
            choices = list(
              paste(choices$mylist, collapse = ",")
            )
      )
  ...
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/713pB.png" rel="noreferrer"><img src="https://i.stack.imgur.com/713pB.png" alt="enter image description here"></a></p>
  
  <p>how can i make this work?</p>