Single package installation can be performed with
install.packages("package_name")
For example,
install.packages("caret")
Usually, R will install package dependencies. For some larger packages with a long chain of dependencies, such as the caret
package,
install.packages("caret", dependencies=c("Depends", "Suggests"))
Note – this can take a non-trivial amount of time and bandwidth depending on the complexity of the package.
To see what packages are installed:
installed.packages()
To update currently installed packages,
update.packages()
This will update the installed packages, but prompt you upon updating each. To update all without prompting,
update.packages(ask=FALSE)
Leave a Reply