Downloads and installs the latest R version

Share:

Description

Fetches the latest (not development!) R version

Usage

1
2
3
4
  install.R(page_with_download_url = "https://cran.rstudio.com/bin/windows/base/",
  pat = "R-[0-9.]+.+-win\\.exe", to_checkMD5sums = TRUE,
  keep_install_file = FALSE, download_dir = tempdir(), silent = FALSE,
  ...)

Arguments

page_with_download_url

URL from which the latest stable version of R can be downloaded from.

pat

the pattern of R .exe file to download

to_checkMD5sums

Should we check that the new R installation has the files we expect it to (by checking the MD5 sums)? default is TRUE. It assumes that the R which was isntalled is the latest R version.

keep_install_file

If TRUE - the installer file will not be erased after it is downloaded and run.

download_dir

A character of the directory into which to download the file. (default is tempdir())

silent

If TRUE - enables silent installation mode.

...

extra parameters to pass to install.URL

Details

If you are not sure if you need to update R or not, It is better to use updateR for updating R, since it includes more options. But in case you wish to only install R, with no other steps taken (for example, taking care of your old packages), then you can use install.R()

See the install.Rdevel function for installing the latest R-devel version.

Value

TRUE/FALSE - was the installation of R successful or not.

References

https://cran.r-project.org/bin/windows/base/

See Also

uninstall.R, install.Rdevel, updateR, system

Examples

1
2
3
4
## Not run: 
install.R() 

## End(Not run)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.