title: Box Plot in Shiny R
body: <p>I am trying to create/ learn an interactive box plot through Shiny, below id the code i m trying to use. This gives me the error</p>
  
  <blockquote>
    <p>Warning: Error in model.frame.default: variable lengths differ (found for 'input$p') <br>
      [No stack trace available]</p>
  </blockquote>
  
  <p>I am unable to figure this out, any help would be much appreciated </p>
  
  <p>CODE:</p>
  
  <pre><code>library(shiny)
  
  ui &lt;- fluidPage(
    selectInput("p","p",choices = names(mtcars)),
    plotOutput("myplot"))
  
  server &lt;- function(input, output, session) {
  
    output$myplot &lt;- renderPlot({
      boxplot(mpg ~ input$p , data=mtcars)
    })
  }
  
  shinyApp(ui, server)
  </code></pre>