4

I have a working shiny app which uses library(coral), where coral is a package I wrote myself, installed in the directory of the shiny app.

When I attempt to deploy my app onto shinyapps.io, I receive the following message:

Error: Unable to retrieve package records for the following packages:
- "coral"
Execution halted

From what I can gather online, the issue is probably that coral is not on CRAN, so shinyapps.io cannot get the records for that package from there.

Is that a correct description of the problem? And is there a simple solution?

Thanks in advance.

John Smith
  • 393
  • 1
  • 6
  • 17

1 Answers1

4

shinyapps.io has the devtools package, and it can install packages from GitHub, if you don't mind putting your package there:

library(devtools)
devtools::install_github("youruser/yourpackage")

devtools has other functions too to install from other sources, for example install_bitbucket() from bitbucket, install_url() from an arbitrary url and install_file() from a local file on disk.

To install from a local directory, you can use install:

devtools::install('path/to/r/package/dir')
janos
  • 120,954
  • 29
  • 226
  • 236
  • Thanks janos - unfortunately I can't put the package in a public location; I don't suppose there is another way for devtools to install the coral package? – John Smith Jul 19 '17 at 18:07
  • @JohnSmith something happened? Why did you unaccept? – janos Jul 19 '17 at 19:24
  • Hi janos, sorry I can't seem to find the install_file function in devtools, and the install_local requires a tar, zip, tar.gz tar.bz2, tgz2 or tbz. If you know how to get around that, I'd be very grateful. I'm accepting anyway, sorry about that. – John Smith Jul 19 '17 at 19:26
  • @JohnSmith I amended my answer again, you can install from a directory using `devtools::install` – janos Jul 19 '17 at 19:32
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/149643/discussion-between-john-smith-and-janos). – John Smith Jul 19 '17 at 19:44