title: Is there a way to add lines to a plot using renderPlot in Shiny
body: <p>I'm trying to add a horizontal line to a plot within a renderPlot Shiny function.  When I add the abline command for the horizontal line, the plot does not render and I see just a horizontal line.</p>
  
  <p>If I remove the abline command, the plot works as expected.  I've tried adding the parameter 'new = FALSE' to the abline command, with the same result.  I see other examples in SO where it appears to work, but I cannot get it to function properly.</p>
  
  <pre><code>library(shiny)
  library(quantmod)
  library(TTR)
  
  # UI
  ui &lt;- pageWithSidebar(
  
    # App title ----
    headerPanel("Test Plot with Lines"),
  
    # Sidebar panel for inputs ----
    sidebarPanel(
      textInput (inputId = "ticker",label = "Ticker Symbol",value="SPY")),
  
    # Main panel for displaying outputs ----
    mainPanel(
      plotOutput(outputId = "mainPlot")
    )
  )
  
  # Server logic
  server &lt;- function(input, output) {
  
    OHLCData &lt;- reactive ({
      tickerData &lt;- get(getSymbols(input$ticker))
      return (tickerData)
    })
  
    output$mainPlot &lt;- renderPlot ({
      tickerData &lt;- OHLCData()
      meanOpeningPrice &lt;- mean(tickerData[,1])
      plot (tickerData[,1],main=paste(input$inputId,' Opening Price'))
      abline (h=meanOpeningPrice,col='red',new=FALSE)
    })
  }
  
  shinyApp(ui, server)
  </code></pre>
  
  <p>I expect to get a plot of the daily opening price with a red horizontal line at the mean price.  Instead I get just a red horizontal line with no axes nor plot of the price.</p>