libPath Function in R – Get & Set Path for Libraries (2 Examples)
This tutorial shows how to get and set the directory path of libraries in the R programming language.
Example 1: Find Out where R does Store Packages
.libPaths() # Applying .libPaths function |
.libPaths() # Applying .libPaths function
Example 2: Define New Directory Path for Storing R Packages
.libPaths("C:/Users/Data Hacks/Desktop/My_Folder") # Applying .libPaths function |
.libPaths("C:/Users/Data Hacks/Desktop/My_Folder") # Applying .libPaths function