R Installation of External Packages

image_pdfimage_print

Related articles: R Installation, Transform RScript

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

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

  1. Enter install.packages() in the R console.
  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 Transform RScript 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>))
>>
image_pdfimage_print