"Bad Request: package 'ggplot2' is required by 'plotly' so will not be detached"

63 views Asked by At

I am working with an openCPU app and I am trying to plot a plotly plot with it. I have a function built that makes a ggplot and then passes that plot into the plotly::ggplotly() function and generates the plot after. I have a separate function that openCPU calls which calls the previous function to generate the plot.

However when openCPU calls its function, I am getting the following error message:

"Bad Request: package 'ggplot2' is required by 'plotly' so will not be detached".

I am unsure as to why this is happening because I have both packages installed. I saw someone had a similar issue to this and used the following code to try and solve this issue:

detach("package:plotly", unload=TRUE)

I run this code both before and after the plotly plot function call and it did not change the error. Does anyone have any idea as to how to fix this?

0

There are 0 answers