Wednesday, April 12, 2023

R Tutorial Playlist - How to load, install, uninstall, require, list packages

 Packages are libraries of R features. Some of them are core part of R, but most of them are not. Those non core packages could be imported into your code when necessary.

With command install.packages("package name") you are going to install single package to your system. You could also, instead of single package, provide collection of packages.

Command update.packages() is going to update all of packages already installed on your system.

Command library("package name") is going to import library to you R session. If instead of function library("package name"), you use command require("package name"), if there is no package with provided package name installed on your system, R is going to ask you to install required package, otherwise this function is going to return value FALSE.

Function installed.packages() is going to return entire list of installed packages.

Command uninstall.packages("package name") is going to remove package with provided package name. With this function, you could also instead of single package name, provide collection of package names.

Here is the link for YouTube video that deals with this subject.



No comments:

Post a Comment