2
votes

I am trying to deploy a shiny app and am running into trouble...

I have an Rmd file, and am trying to publish this document first by running locally in Rstudio, then on web. My files are stored on my home user directory in a folder named Shiny. This has the files imported, my RMD, my shinyapps.io file, and my rsconnect file.

  • title: "Sedentary Analysis"
  • author: "Bianca Gonzalez"
  • date: "July 26, 2016"
  • output: html_document
  • runtime: shiny

When I run the rsconnect::deployApp('SedentaryAnalysis.Rmd') file I get: Document successfully deployed to https://biancagonzalez.shinyapps.io/SedentaryAnalysis/

However when I open my link, I get the error:

/home/shiny/SedentaryAnalysis does not exist.

Thanks for helping me understand this error.

Bianca G

1

1 Answers

2
votes

When you call rsconnect::deployApp('SedentaryAnalysis.Rmd'), it only deploys that one file (SedentaryAnalysis.Rmd). Your .Rmd probably has code in it that refers to other files. Those files need to be deployed too for your code to work on shinyapps.io. Here is what you need to do:

  1. Replace any absolute paths in your document with relative ones.

  2. Call rsconnect::deployDoc(...) instead of rsconnect::deployApp(...). This will tell RStudio to look for the files you use in the document and deploy them with the document.

If you're using RStudio, its Publish button will do most of this for you, so try clicking that in the toolbar.