By   March 25, 2014

We can extend the features provided by R using packages. In this post we are going to discuss various options to install packages in RStudio.

Install Package Tool

A package can easily be installed in RStudio from package Install Package tool. It is available under Tools Menu in RStudio. The package can have other dependencies. It gives us options to install all dependencies with the package.


Installing R Package from Packages View

We can also install a package directly from Packages view. We can navigate there using the following menu. You just need to check the check box for the package and it loads the library. These are the packages which are already installed. For installing new packages, just select the Install Package button at the top, which should open up the same installation dialog.


Installing R Package from Console

And finally we can install them directly from console. Here we are using install.packages to install a package. Since I already have shiny installed, I am using a different package to show you how exactly it is done.


Package Download Location

By default, these packages are downloaded in your Documents folder.


Category: R