Package Repositories
You can find or store packages in a variety of repositories. You can create your own in-house repository using the drat package.
You can download a package from a public repository, such as Posit, CRAN, or TERR Archive Network (TRAN) repository, or you could use the drat package to create and maintain an in-house repository that is managed by your organization's package curator.
Public repositories
You can download open-source packages from a repository, and then use the functions in the package in your data functions in Spotfire. Be sure to review the list of differences between the TERR engine, available from the TERR landing page. Also review the limitations and considerations.
TRAN packages
A number of popular CRAN packages occasionally require customization
to work with
TERR.
Spotfire hosts a package network,
TRAN,
where you can find these customized packages. Individual users can download
these packages using the
TERR
console application by calling the function
install.packages()
. Optionally, these customized
packages can be built into a Spotfire SPK and placed on a
Spotfire Server
to be available to
Spotfire
users throughout your organization.
Some packages customized and placed on TRAN require other packages not available on TRAN. Some of these packages cannot be installed using the
TERR function
install.packages
, so the TRAN package cannot be successfully installed. If you encounter this situation, try building and installing the package using open-source R.
Company repositories
One skilled package developer in your organization should have the role of package curator to oversee the package version integrity within the company’s package repository, whether these are packages downloaded and tested from a public repository or developed internally and kept in a CRAN-like in-house repository.
One easy way to establish and maintain a company repository is with the drat package, which is available in the Posit and CRAN repositories. Using the drat package, you can create an in-house repository (on either a web server or a network share), you can upload packages to the in-house repository, and you can install packages from the in-house repository. For more information on using drat, install it into your TERR or open-source R console application, and then refer to its language reference and vignettes.
For more information about installing existing packages, see Installation options for packages.
- Specifying an Older Package on TRAN
TERR and open-source R search for packages differently. By default, the repository search order foroptions('repos')
is set to TRAN, Posit, and then CRAN. If a package exists in all repositories, then TERR selects the version in TRAN, but open-source R selects the newest one based on the package version number.