How can I use package RSelenium in a Shiny app hosted on shinyapps.io?

93 Views Asked by At

Hello smart people of the internet,

I have written an app in R Shiny that uses the package RSelenium (and specifically, its rsDriver function). It works fine on my local machine. However, when I try to publish the app to shinyapps.io I get an error that I have been able to deduce is being caused by the library(RSelenium) command.

Specifically, the following example code, saved as app.R, can be successfully published on shinyapps.io:

library(shiny)
# library(RSelenium)

ui <- fluidPage(title = "This is a shiny app")
server <- function(input, output) {}
shinyApp(ui = ui, server = server)

but it can't be published if you remove the commenting out of the second line -- the error message is long and kind of weird, but it appears to be related to phantomJS ("Package phantomjs is not available, but is referred to by another package").

I have tried a few things, such as throwing in if (!webshot::is_phantomjs_installed()) webshot::install_phantomjs() at the top but it's not working.

Any suggestions?

Thanks!!!!!!!!!!!!!!!

0

There are 0 best solutions below