title: Shiny R Histogram
body: <p>I am using below code to lean Shiny R , when i run this code, it gives me this error:</p>
  
  <blockquote>
    <p>Warning: Error in hist.default: 'x' must be numeric
      [No stack trace available]</p>
  </blockquote>
  
  <pre><code>library(shiny)
  
  ui &lt;- fluidPage(
    selectInput("Ind","Indipendent Variable",choices = names(mtcars)),
    selectInput('Dep','  Dependent Variable',choices = names(mtcars)),
    plotOutput("BoxPlot"),
    plotOutput('Hist'))
  
  server &lt;- function(input, output, session) {
  
    data1 &lt;- reactive({input$Ind})
    data2 &lt;- reactive({input$Dep})
  
    output$BoxPlot &lt;- renderPlot({boxplot(get(data2()) ~ get(data1()) , data=mtcars)})
  
    output$Hist &lt;- renderPlot({hist(get(data1())}) 
  
  }
  
  shinyApp(ui, server)
  </code></pre>
  
  <p>any help why would it say so ?</p>