Identifying a list of installed TERR / R packages and their versions.
book
Article ID: KB0080507
calendar_today
Updated On:
Products
Versions
Spotfire Enterprise Runtime for R
All supported versions
Spotfire Analyst
All supported versions
Spotfire Desktop
All supported versions
Description
An R package is a set of functionality for R or TERR that might not be included in the base installations of R or TERR. You may need to install additional R packages in order to create or use Spotfire analyses that include TERR Data Functions and/or TERR Expression Functions. For example, the TERR or R script used in a Spotfire data function may have been written to use functions from one or more of the user-contributed packages available from the open-source R community's CRAN repository (https://cran.r-project.org/).
A common source of issues in data functions is the use of different versions of such packages in different working environments. In a scenario where a data function works properly in one environment, but fails in another environment, a good first step in troubleshooting is to compare the versions of external packages installed in both environments.
Issue/Introduction
Identifying a list of installed TERR / R packages and their versions.
Environment
All supported environments
Resolution
The following TERR script generates a listing of all installed packages and their versions:
ip <- as.data.frame(installed.packages()[,c(1,3:4)]) rownames(ip) <- NULL ip <- ip[is.na(ip$Priority),1:2,drop=FALSE] print(ip, row.names=FALSE)
These commands can be executed in both environments and available package versions can be compared in one go.
The following command will also generate a listing of all installed packages and their versions, but it includes all of the built-in core packages in its listing: