Problem Installing Packages in the RStudio IDE

Follow

If you are unable to install packages in the RStudio IDE, some common problems are outlined below:

Are you able to install packages in R?

If you're having issues, we recommend trying to install packages in R (outside of RStudio) and see if you're able to do that. If not, please check the possible solutions below.

Is the package available?

Make sure that the package is available through CRAN or another repository, that you're spelling the name of the package correctly, and that it's available for the version of R you are running.

Try a different CRAN mirror

It is possible your default CRAN Mirror is down or currently unavailable. You can switch to a different CRAN mirror from the RStudio Options Menu.

Set your default repositories

By default, R will only search for packages located on CRAN. You can include Bioconductor, R-Forge, and others by using the setRepositories() command from the console. To preserve this setting over sessions, you can also define this in your .Rprofile or other Startup file.

Are you able to connect to the Internet, or does your internet use a proxy?

If you're not able to connect to the Internet via R, you may not be able to download and install packages. If your networking environment requires outbound network connections to go through a HTTP proxy, see the following Knowledge Base article on Configuring R to Use an HTTP Proxy

Still having problems?

Open-source RStudio IDE users may start a new discussion topic at community.rstudio.com.

RStudio Workbench (previously RStudio Server Pro) customers should create a new support ticket with the details of your specific problem and your current system configuration.

Return to Troubleshooting Guide: Using RStudio

Comments