9

My Shiny app will run locally, but when I try to deploy to shinyapps.io it will not. I temporarily fixed the problem by removing the 'dot' in the path to the .csv file:

data <- read.csv("/Users/JMJC/Desktop/bbteams-shiny/bbteams.csv")

But when it deployed to shinyapps.io I received a different error, ERROR: cannot open the connection.

shinyapps::deployApp('/Users/JMJC/Desktop/bbteams-shiny')

I placed my data set in the same directory as server.r and ui.r. And I made sure to setwd() to the same directory.

I'm out of ideas. If I don't remove the dot it will not deploy, but if I do remove the dot it cannot make the connection. If I force it to deploy, it still will not make the connection.

Enrique Pérez Herrero
  • 3,699
  • 2
  • 32
  • 33
conv3d
  • 2,668
  • 6
  • 25
  • 45

3 Answers3

3

As @DieterMenne already stated in the answer section: Simple solution:

read.csv("bbteams.csv")

Useful link for this and other issues:

https://support.rstudio.com/hc/en-us/articles/229848967-Why-does-my-app-work-locally-but-not-on-shinyapps-io-

PeterD
  • 1,331
  • 12
  • 22
3

Make sure the path you give for the data file and the path for you R files is the same. So you do not need to mention the whole path, in your case data <- read.csv("/Users/JMJC/Desktop/bbteams-shiny/bbteams.csv") instead just use read.csv("bbteams.csv")

HellYeah
  • 59
  • 6
-1

Type the following into the console:

find_rtools() 

This should return TRUE if your Rtools installation worked properly. If not, follow the instructions here: http://jtleek.com/modules/01_DataScientistToolbox/02_10_rtools/#6

jesstme
  • 604
  • 2
  • 10
  • 25