Plotly plot not rendering on shiny server
<p>I am using the plotly package to display a plot in shiny. On my local machine the plot renders perfectly, however when I run the shiny app on shiny server I receive the error "Error: cannot open file 'Rplots.pdf'" where the plot is supposed to be rendered. I have tried using the dev.off() command as I had read some other possible solutions that referenced this as a possible solution. Below I pasted my code for creating the graph in the server.R script:</p>

<pre><code>    output$recSalesPlot &lt;- renderPlotly({
       BWplot_rec &lt;- ggplot(d1, aes_string(x = "End_of_Week", y = input$metric_rec))
            BWplot_rec &lt;- BWplot_rec + geom_line(aes(color = Group), size = .25)
            BWplot_rec &lt;- BWplot_rec + geom_point(aes(color = Group), size = 2)
            BWplot_rec &lt;- BWplot_rec + xlab("Week")
            if(input$metric_rec == "NetSales"){
              BWplot_rec &lt;- BWplot_rec + ylab("Euros")
            }
            BWplot_rec &lt;- BWplot_rec + ggtitle(paste0("Average ", input$metric_rec, " Per Group Per Week"))
            BWplot_rec &lt;- BWplot_rec + guides(color=FALSE)
            BWplot_rec &lt;- BWplot_rec + theme(panel.grid.major.y = element_blank(),
                                             panel.grid.minor.y = element_blank())
            p &lt;- ggplotly(BWplot_rec)
            p
          })
}
</code></pre>

<p>In the ui.R script I am using the following command to call the plot:</p>

<pre><code>plotlyOutput("recSalesPlot", width = "100%", height = 600)
</code></pre>