Yes. In order to run your applications on shinyapps.io, the service needs to replicate the environment from your local machine. shinyapps.io is built using Ubuntu Linux as the base operating system, and is likely to be different from most users’ systems.
The shiny
package supports the use of any package in R that you can install. Although shinyapps.io supports the vast majority of packages in the R ecosystem, there are two key exceptions:
- R packages that don’t run on Ubuntu Linux
- R packages that require access to the display (such as Tcl/Tk)
When you deploy your application, the rsconnect
package detects the packages that your application uses. It does that by looking for explicit library()
calls within your application. Additionally, you should not have an explicit install.packages()
call within your ui.R or server.R files.
During deployment, the rsconnect
package sends the R version, the list of packages and their dependencies, and your application to shinyapps.io. shinyapps.io builds and installs the packages into the R library for your application. The first time you deploy your application, it may take some time to build these packages (depending on how many packages are used). However, you will not have to wait for these packages to build during future deployments (unless you upgrade or downgrade a package, or you upgrade to a newer version of R).
Package sources
Currently, the shinyapps.io service supports deploying packages installed from CRAN, GitHub (both public and private repos), and BioConductor.
Important note on GitHub packages
Only packages installed from GitHub with devtools::install_github
, in version 1.4 (or later) ofdevtools
, are supported. Packages installed with an earlier version of devtools
must be reinstalled with the later version before you can deploy your application. If you get an error such as “PackageSourceError” when you attempt to deploy, check that you have installed all the packages from Github with devtools
1.4 or later.
Managing R versions
There are typically three releases of R per year. In order to support the new version of R, shinyapps.io needs to compile R for each version. Typically, new versions of R are supported within three days of release.
System packages
R packages will often rely on operating system packages to be installed on the server. If your application happens to use an R package that requires a system library that is not installed by default, please let us know by filing an issue, or a pull request, at: shinyapps-package-dependencies
Comments