OHDSI Home | Forums | Wiki | Github

Error when deploy R shiny app to shinyapps.io


(Hyunki Woo) #1

Hi, I am Hyunki Woo in Samsung Medical Center in Korea.

My Shiny app is running locally with no problem, but when I try to deploy to shinyapps.io it will not.
When it deployed to shinyapps.io I received a error, ERROR: cannot open the connection.
I think that’s because of the path of the data set, so I try to set working directory carefully.
I made code to read my data set as belows.

DF <- read.table("~/R working/01_NEW1_prototype_2/abc.csv", header=T, sep =",")

  • my working directory is (~/R working/01_NEW1_prototype_2)
  • I put ui.R, serve.R, and other data set files in same working directory.
    But when I force it to deploy, it still will not make the connection.
1. How can I solve the problem as above? (Especially 'Working directory', 'Read data set' problems). 2. When I publish to shinyapps.io, every data set file also shall be published? Or just ui.R and serve.R files only?

(Martijn Schuemie) #2

I’m no Shiny expert, but I think all data needs to be in a subfolder named data in your app. You can then load files from this folder, like I’m doing here for example.

It may also be that all data in this folder needs to be in R data objects (’.rda’ or ‘.rds’), but I’m not sure about that.


(nick) #3

Troubleshoot the error with the assistance of kaspersky antivirus error 1922 and you can also get some technical information from it. Also, download the necessary plugins.


t