Skip to main content
Skip table of contents

R App

Apps allow you to run R code on Alli Marketplace's infrastructure in isolation. 

Learning R is left as an exercise for the reader. Once you are able to run R locally, then you should be good to go running it on Alli Marketplace. 

Configuration

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. 

External Dependencies

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 Imports and Remotes sections if applicable. 

CODE
Imports:    rvest,    dplyr,    AnomalyDetectionRemotes: github::twitter/AnomalyDetection

Above is an example DESCRIPTION file that installs the rvest, dplyr, and AnomalyDetection packages. 

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. 

System-Level Dependencies

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:

  • libssl-dev

  • libssh2-1-dev

  • libcurl4-openssl-dev

  • libxml2-dev

Your script

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. 

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.