Manage packages in R
In this article, we will see how to manage packages in R Programming Language using R script.
What are R packages?
R packages are the set of functions and datasets written in a single code and are stored in a directory called library.
We will be looking at:
- How to Install packages
- How to Uninstall packages
- How to Update packages
- How to find all the installed packages
Using R pre-defined functions.
How to Install packages:
To install the package in R use install.packages(“packagename”) and replace packagename by the package you want to install.
Note: packagename is case-sensitive.
How to Uninstall packages:
To uninstall/remove the package from your device use remove.package(“packagename”) and replace the package name by the package you want to uninstall/remove. This function will remove the package if it is already installed.
How to Update packages:
To update the package we use update.package() and it does not require any parameters. This function will update all the packages running on the older version.
How to find all the installed packages:
To get the installed packages on the device we use installed.packages() and it does not need any parameters as well. This function will show all the installed packages on the device.
installed.packages() will return all the installed functions on the system.
Please Login to comment...