In addition to the common configuration, R has some additional options.
See the App Process & Development Deep Dive page for more information about these types of configurations.
There are two different types of external dependencies for R Apps. There are packages that live within the Debian operating system and there are R packages that your code depends on. Sometimes, however, R packages that your code depends on relying on those system-level packages.
R Package Dependencies
R packages are normally installed from CRAN and are defined in a
DESCRIPTION file. The
DESCRIPTION file should be present in the base directory of your uploaded file.
See here for more information about
DESCRIPTION files and specifying dependencies. You will only need to provide the
Remotes sections if applicable.
Above is an example
DESCRIPTION file that installs the
Some of the packages you specify as dependencies rely on system-level packages. For instance, the package rvest depends on the
libxml2-dev package. In order to use
rvest, you will need to have
libxml2-dev installed. See the following section for more information.
The system-level external dependencies for R Apps are listed in the Packages widget. This is a list of Debian packages to install on the running container before your code starts to run.
Executions will show as output those packages that are not installed that are required for your R packages.
By going back to the App and providing the package, you can ensure all future executions will have that system package installed. You will find that R packages your code depends on will always depend on the same system package. These will not change, so if you can determine which R packages rely on which system packages, you can always have your dependencies installed.
These system packages are always installed for you:
The R code invoked in the Execution should return an exit code of 0 to indicate a successful run. Any other exit code indicates failure.
Additionally, your script should stop its work if it receives a SIGTERM (15) signal.