Product |
Version |
SERR/TERR/Opensource R |
All Versions |
Keywords:
SEER/TERR/Opensource R, install packages, versions, library paths, Spotfire Service for TERR/Opensource R.
Note: If you're experiencing issues importing a package even after installing it, you might need to uninstall and reinstall it using the commands provided in this article. This could be due to incomplete installation, corrupted files, or version conflicts.
Managing TERR/R Packages: A Quick Guide
Managing packages in R is essential for extending its functionality and accessing various libraries for data analysis, visualization, and more. Here’s a simple guide to help you install, upgrade, and manage R packages efficiently.
Navigation Info:
You can find the TERR engine in the /nodemanager/<version_#>/nm/services/<TERR Service name_guid#> /terr/bin directory.
The R engine should be available from wherever you installed it and specified in SPOTFIRE_R_HOME
or rhome.path
.
Install Latest Version:
install.packages("<package name>")
Install/Upgrade (Specific Version):
install.packages("<package name>", version = "<version number>")
Replace `<package name>` with the name of the package you want to install or upgrade, and `<version number>` with the specific version you desire.
This command will install the latest available version of `<package name>`.
Install Multiple Packages at once with Version:
Map(function(package, version) install.packages(package, dependencies = TRUE, repos = "https://cran.rstudio.com/", type = "source"), c("package1", "package2", "package3"), c("1.0.0", "2.0.0", "3.0.0"))
Uninstalling Packages
remove.packages("<package name>")
Listing Installed Packages
installed.packages()
This command provides a list of all installed packages, their versions, and other details.
Additional Options
Specify Library Location
install.packages("<package name>", lib = "D:/Package")
Replace `"D:/Package"` with your desired directory path.
Set Proxy
Sys.setenv(http_proxy = "http://proxy", https_proxy = "http://proxy")
install.packages("<package name>")
Replace `"http://proxy"` with your proxy server URL.
Specify Repositories
install.packages("<package name>", repos = c("https://CRAN.R-project.org", "https://another.repo.org"))
Replace the URLs with the repositories you want to use.
Checking Package Version
To check the version of an installed package:
packageVersion("<package name>")
Conclusion
Mastering package management in TERR/R is crucial for effective data analysis and programming. With these commands, you can install, upgrade, uninstall, and manage TERR/R packages efficiently to meet your project’s requirements. Adjust these commands as per your specific environment needs and enjoy seamless package management in TERR/R!
Related Articles:
Guide to Finding TERR/Opensource R Installed Packages, Versions, and Library Paths
Documentation Reference:
Spotfire Enterprise Runtime for R
Spotfire Service for R