R Installation of External Packages


For the RScript transform, a huge number of packages are available for various domains in statistical analysis. To use a package inside of an RScript transform, you must download and install it in R first.

To perform an R installation of External Packages, follow these steps:

  1. Enter install.packages(“abc”, lib=”R-installation directory”) in the R console, where abc is the name of the package you want to install and lib is the path where R has been installed on your machine. It typically points to a path such as “C:/Program Files/R/R-3.5.2/library”. It is also the same as the path set to the environment variable R_HOME.
  2. Choose a CRAN repository.
  3. Choose the package that will be installed.
    Note: by default, R tries to install the libraries to the directory:  <R Installation directory>/library.
  4. If you get an error message on insufficient authorizations, start the R console as an administrator.

Don’t use a personal library for the R packages. Depending on your authorizations, it might be that Jedox Integrator doesn’t have access to this directory. As an alternative, you can also use a different directory for the libraries by setting the environment variable R_LIBS to point to this directory.

For more information, see https://cran.r-project.org/web/packages/ or run ?install.packages() within the R console.

In RScript Transform, these packages have to be declared with their name in the table “External Packages”. This generates the following R command for each package which is processed before the RScript transform:

suppressPackageStartupMessages (require (<name of package>))

 Related links: