R Execute Package Dependencies

After you have met the hardware and Java requirements, and you have installed open-source R, install the R packages required to run R Execute.

  • Rserve 1.7-3
  • data.table 1.9.4 or higher.

Note that data.table also depends (directly or transitively) on the following:

  • Rcpp (0.11.3 or higher)
  • plyr (1.8.1 or higher)
  • stringr (0.6.2 or higher)
  • chron (2.3-45 or higher)
  • reshape2 (1.4.1 or higher)

These packages should be installed automatically upon service start-up (start_services.sh shell script) if they are not in the R local repository, because the R connector ships with the tar files that contain the package sources. However, if there are file permission conflicts, the installation can fail. In such a case, first try fixing file permissions. If that doesn't help, try installing the packages manually. The following example shows installing packages from the R or TERR console command line (or from your installation of RStudio).

install.packages(pkgs = c('/full/path/Rserve_1.7-3.tar.gz', '/full/path/data.table_1.9.4.tar.gz'), repos = NULL, type='source')

Note: You must supply the full path to the tar.gz files, which is the directory in which you unzipped the R server .tar file.

Manual installation should never be necessary due to the automation built into the start_r_component.R script, which is called by the start_services.sh shell script. However, if you must perform manual installation from the .tar files, note that the package installation order matters, due to the dependency graph. The recommended package order is as follows.

  1. Rcpp
  2. plyr
  3. stringr
  4. chron
  5. reshape2
  6. Rserve
  7. data.table

If you must perform manual installation, and you have an internet connection, the dependencies are downloaded automatically. In that case, you can install just Rserve and data.table.

install.packages(pkgs = c('Rserve', 'data.table'))
Note: You might need to select the CRAN repository programmatically; otherwise, you might be prompted to supply the name of the CRAN repository to use. A programmatic selection looks like the following:
install.packages(pkgs = c('Rserve', 'data.table'), repos='http://cran.cnr.berkeley.edu/')

You can find the list of CRAN mirrors at https://cran.r-project.org/mirrors.html.

Related concepts