Deploying a Shiny app using a self-written package

别来无恙 提交于 2019-12-02 00:56:53

问题


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.


回答1:


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')


来源:https://stackoverflow.com/questions/45197820/deploying-a-shiny-app-using-a-self-written-package

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!