If you have write permission to the computer hosting
Spotfire Service for R, then you can install packages to a specific
location manually, and then point to the package location in the custom
configuration.
About this task
Perform this task
on the computer hosting the
Spotfire Service for R (in the directory where the
R engine is installed), and then on the computer
where Spotfire Server is installed.
This method of installing packages is useful for packages that have a
larger number of dependent packages. Dependent packages are installed by
default, rather than manually, using this method.
Any time you install additional packages or update existing packages,
be sure to install them in the directory you specified for your
packagePath
. You can have only one package path for
Spotfire Service for R installation.
Before you begin
You must have
administrative privileges to create a directory where packages are installed.
You must have administrative privileges and the tools password to update the
custom.properties file.
Procedure
-
On the host computer, create a directory to hold the packages.
You need to perform this step just the first time you install
packages.
Example:
/opt/r/library
-
From a command prompt, launch
R console.
The
R engine should be available from wherever
you installed it and specified in
SPOTFIRE_R_HOME
or
rhome.path
.
-
Install the packages to the directory you created, and where the
Spotfire Service for R can find them.
In this example, the survival package and its
dependent packages are installed in the directory
/opt/r/library.
install.packages("survival", lib="/opt/r/library")
The package and its dependent packages are installed.
-
Close the
R console.
At the
R command prompt, run the command
q()
.
The
R console closes.
-
Update
Spotfire Service for R configuration to specify the package
path.
You need to export, edit, and reimport the
custom.properties file only the first time to
set the package path.
-
Follow steps 1-3 in
Configuring the Service
to export the service configuration file
custom.properties.
-
In the exported
custom.properties file, locate the entry for
packagePath
.
-
Provide the path that you specified for the installed
packages.
Note: The
configuration setting
packagePath
requires forward slashes (/)
regardless of operating system.
-
Complete the steps to rename, save, update, and import the
changed service configuration file, as described in
Configuring the Service.