title: Shiny renderPlotly with two conditions
body: <p>I am developing app in Shiny. I want to render plot using submit button. I also want to print labels if user check the inputcheckbox. I am able to render plot via button. But it doesnt work when the checkbox checked. </p>
  
  <p>Here is the code:</p>
  
  <pre><code> library(shiny)
   library(plotly)
  
   ui &lt;-  fluidPage(
   actionButton('RUN', 'Run'),
   checkboxInput('PrintLab', 'Label', FALSE),
   plotlyOutput("plot1")
   )
  
   server = function(input, output) {
   output$plot1 &lt;- renderPlotly({
   req(input$RUN)
   isolate({
     ggplotly(ggplot(data = mtcars, aes(wt, hp)) + 
             geom_point(size=1, colour = "grey"))
     })
  
    req(input$PrintLab)
    isolate({
     ggplotly(ggplot(data = mtcars, aes(wt, hp)) + 
             geom_point(size=1, colour = "grey") +
             geom_text(aes(label=wt), size=3, colour = "black"))
     })
  
   })
  }
  
   runApp(shinyApp(ui, server))
  </code></pre>