title: Printing all factor levels as a list in a shiny dashboard
body: <p>I would like to print all levels of a factor in a shiny dashboard. I know I could easily do that by:</p>
  
  <pre><code>library(shiny)
  
  
  # Define UI for application that draws a histogram
  ui &lt;- fluidPage(
  
      # Application title
      titlePanel("Testing shiny App"),
  
      # Show a plot of the generated distribution
      mainPanel(
          htmlOutput("my_levels_list")
      )
  )
  
  # Define server logic required to draw a histogram
  server &lt;- function(input, output) {
  
          output$my_levels_list &lt;- renderUI({
              HTML(levels(iris$Species))
          })
  }
  
  # Run the application
  shinyApp(ui = ui, server = server)
  
  </code></pre>
  
  <p>But all the results are outputed within the same row:</p>
  
  <pre><code>&lt;div id="my_levels_list" class="shiny-html-output shiny-bound-output"&gt;setosa versicolor virginica&lt;/div&gt;
  </code></pre>
  
  <p>What I would like to have is something like this instead:</p>
  
  <pre><code>&lt;div id="my_levels_list" class="shiny-html-output shiny-bound-output"&gt;
  &lt;ul&gt;&lt;li&gt;setosa&lt;/li&gt; &lt;li&gt;versicolor&lt;/li&gt; &lt;li&gt;virginica&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;
  </code></pre>
  
  <p>I tried with more extravagant code like:</p>
  
  <pre><code>library(shiny)
  
  
  # Define UI for application that draws a histogram
  ui &lt;- fluidPage(
  
      # Application title
      titlePanel("Testing shiny App"),
  
      # Show a plot of the generated distribution
      mainPanel(
          htmlOutput("my_levels_list")
      )
  )
  
  # Define server logic required to draw a histogram
  server &lt;- function(input, output) {
  
      output$my_levels_list &lt;- renderUI({
          for (i in iris$Species) {
              HTML(i)
          }
      })
  
  }
  
  # Run the application
  shinyApp(ui = ui, server = server)
  </code></pre>
  
  <p>But nothing is outputted.</p>