The R Project for Statistical Computing.
R is a free software environment for statistical computing and graphics. It compiles and runs on a wide variety of UNIX platforms, Windows and MacOS. To download R , please choose your preferred CRAN mirror.
If you have questions about R like how to download and install the software, or what the license terms are, please read our answers to frequently asked questions before you send an email.
R version 4.0.0 (Arbor Day) prerelease versions will appear starting Tuesday 2020-03-24. Final release is scheduled for Friday 2020-04-24.
useR! 2020 will take place in St.В Louis, Missouri, USA.
The R Foundation Conference Committee has released a call for proposals to host useR! 2020 in North America.
You can now support the R Foundation with a renewable subscription as a supporting member.
The R Foundation has been awarded the Personality/Organization of the year 2018 award by the professional association of German market and social researchers.
Using the RStudio IDE.
Secure Package Downloads for R.
Traditionally installing packages from CRAN has used standard HTTP connections without encryption. However, it’s now possible to install packages from CRAN using encrypted HTTPS connections. Using an encrypted connection is strongly recommended as it provides much higher assurance that the code you are downloading is in fact from a legitimate CRAN mirror rather than r download package from another server posing as one.
This article describes how to ensure that you are using an encrypted connection when installing packages from CRAN. In short, two things are required:
The R download.file.method option needs to specify a method that is capable of HTTPS; and.
The CRAN mirror you are using must be capable of HTTPS connections (not all of them are).
The actions required to ensure secure package downloads differ depending on whether you are working within RStudio or within another environment (e.g. Shiny Server, R terminal, R GUI, ESS, etc.):
For RStudio users, the RStudio IDE includes an option (enabled by default) that takes care of the required configuration automatically. If you are able to use the latest version of RStudio then doing so is the simplest way to ensure secure connections. See the RStudio Automatic Configuration section below for further details.
If you are not r download package able to upgrade RStudio or are running R in another environment entirely you can still modify your configuration to use secure connections. See the Manual Configuration via .Rprofile section below for further details.
RStudio Automatic Configuration.
By default, RStudio automatically configures your R environment for secure downloads from CRAN (and displays a warning message if r download package it’s not able to for some reason). This option is called Use secure download method for HTTP and is available from the Packages pane of the Global Options dialog:
If you are running RStudio v0.99.467 or later and have this option selected (it is by default) then absent a warning message to the contrary your R environment is configured for secure downloads. You can verify this by installing a package and confirming that the download used HTTPS as described in the Testing Your Configuration section below.
If you have this option enabled and still receive a warning message it’s likely you need to select an alternate CRAN mirror that supports HTTPS. Mirrors currently known to support HTTPS are enumerated below in Secure CRAN Mirrors . It’s also possible that you’ve manually specified a download method or CRAN mirror in your .Rprofile that doesn't support secure downloads. RStudio won’t override manually specified options so to establish a secure connection you’ll need to either not set these options (allowing RStudio automatic configuration to set them instead) or change them to secure alternatives as described below in Manual Configuration via .Rprofile .
If you are using Packrat to manage your packages within projects, you may also see warnings when switching to an older project. In that case you'll need to r download package update the repository for that project following the directions below.
Preventing Secure Download Warnings.
We strongly recommend that if you are using a public CRAN mirror that doesn’t support HTTPS downloads that you switch to one which does. However, if you are using a private/internal CRAN mirror that doesn’t support HTTPS you might wish to disable the secure download warning message. To eliminate the warning message you can do one of two things:
Uncheck the Use secure download method for HTTP option; or.
Set the RSTUDIO_DISABLE_SECURE_DOWNLOAD_WARNING environment variable to “1” by setting it in .Renviron or a similar location (see R Startup Files for more on setting environment variables)
The latter might be preferable when you wish to disable the warning for an entire installation of R (e.g. when run on a server or centrally managed desktop environment).
Manual Configuration via .Rprofile.
If you are running an older version of RStudio or running R within another environment entirely you can also manually configure a secure download method and CRAN mirror by adding code to your .Rprofile or Rprofile.site file (see R Startup Files for details on where these files are located).
Secure Download Methods.
When R transfers files over HTTP (e.g. using the install.packages or download.file function) a download method is chosen based on the download.file.method option. There are several methods available and the default behavior if no option is explicitly specified is to use R’s internal HTTP implementation. In many circumstances this internal method will not support HTTPS connections so you’ll need to override the default.
R 3.2 added two new download methods (“libcurl” and “wininet”) that both support HTTPS connections. We recommend that you use these new methods when running under R 3.2 or later. The requisite code to add to .Rprofile or Rprofile.site is as follows:
Note that in the upcoming R 3.2.2 release this will no longer be necessary, as the default method is equivalent to “wininet”.
Note that if you built R from source the “libcurl” method may or may not have been compiled in. In the case that it wasn’t (i.e. capabilities("libcurl") == FALSE) , you can follow the directions for earlier versions of R below to configure an alternate secure method.
R 3.1 and Earlier.
Note that setInternet2(TRUE) is the default value in RStudio however is not for R GUI. If you don’t want to use setInternet2(TRUE) on Windows then the only other way to configure secure downloads is to have the “wget” or “curl” utility on your PATH as described for OS X and Linux below.
Note that the “curl” and “wget” methods will work on any platform so long as the requisite binary is in the system PATH. The recommendations above are based on