title: ggplotly not working in shiny app, plot not showing up
body: <p>I'm currently making a Shiny app and I tried to use this graph (this is used in the server):</p>
  <pre><code>  output$COTY_out1 &lt;- renderPlot({
    
    data %&gt;%
      group_by(year) %&gt;%
      summarize(mean_ls = mean(life_satisfaction, na.rm = TRUE)) %&gt;%
      ggplot(mapping = aes(x = year, y = mean_ls)) +
      geom_line() +
      geom_smooth() +
      labs(y = &quot;Mean Life Satisfaction&quot;, x = &quot;Year&quot;, title = &quot;World&quot;)
    
  })
  </code></pre>
  <p>This shows up well in the app!</p>
  <p><a href="https://i.stack.imgur.com/h3KPm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/h3KPm.png" alt="enter image description here" /></a></p>
  <p>Now, I tried to integrate plotly in this and basically copied this code from working apps. I also consulted stack and found similar answers.</p>
  <pre><code>  output$COTY_out1 &lt;- renderPlotly({
  
  p &lt;- data %&gt;%
    group_by(year) %&gt;%
    summarize(mean_ls = mean(life_satisfaction, na.rm = TRUE)) %&gt;%
    ggplot(mapping = aes(x = year, y = mean_ls)) +
    geom_line() +
    geom_smooth() +
    labs(y = &quot;Mean Life Satisfaction&quot;, x = &quot;Year&quot;, title = &quot;World&quot;)
  
  p &lt;- ggplotly(p)
  p
          
  })
  </code></pre>
  <p>However, after doing this, the graph does not show up. Is there something wrong in the way I've integrated the ggplotly? Like I said before, I looked at similar answers on this forum and basically tried to copy paste a lot of them to no avail.</p>