Operations (R)

Note

You need to have specific permissions to create, modify and use code environments. If you do not have these permissions, contact your DSS administrator.

Create a code environment

  • Go to Administration > Code envs
  • Click on “New R env”
  • Give an identifier to your code environment. Only use A-Z, a-z, digits and hyphens

Note

Code environment identifiers must be globally unique to the DSS instance, so use a complete and descriptive identifier

  • Click on create
  • DSS creates the code environment and installs the minimal set of packages
  • You are taken to the new environment page

Given that compiling R packages from source takes time, it is advised to use Conda when available for code environment, and benefit from pre-compiled packages.

Manage packages

You can manage the list of packages to install by clicking on the “Packages to install” tab.

You see here two lists:

  • A non-editable list of the “base packages”. These are packages that are required by your current settings. These packages cannot be removed, and you cannot modify their version. For more information, see Base packages
  • An editable list of “Requested packages”. This is where you write the list of packages that you want in your virtual environment.

The list of requested packages is a table whose columns are the package name, and the package version, and the rows are the desired packages. The package version is optional, and if left empty, the lastest version is used.

For example:

  • "RJSONIO","1.3" pulls version 1.3 of RJSONIO
  • "dplyr", pulls the latest version of dplyr

Once you have written the packages you want, click on Save and update. DSS downloads and installs the newly required packages

Afterwards, you can inspect the exact installed versions in the “Actually installed packages” tab.

Using different package repositories

R packages not installed via Conda are pulled from repositories that mirror CRAN, and there is regularly a need to use a particular mirror (most often because of the availability of older versions). When DSS is installed on a machine without outgoing internet access, there is also a need to use a packaged CRAN repository hosting on the internal network. To work with both these cases, the user can override the default CRAN mirror in Administration > Settings > Misc, and even override on a per-code environment basis in the Extra Options. This lets the user pass an URL to point to the R packages repository.