The installr package offers a set of R functions for the installation and updating of software (currently, only on Windows OS), with a special focus on R itself. This package has two main goals:
While for Linux users, the installation process of new software may be just running a short line of code, for the regular Windows user it often includes browsing online, finding the latest version, downloading it, running the installer, and deleting the installation file. All of these steps are automatically done using functions in this package.
To install the stable version on CRAN:
To install the latest installr version from GitHub use:
if (!require('devtools')) install.packages('devtools'); # make sure you have Rtools installed first! if not, then run: #install.packages('installr') #install.Rtools() devtools::install_github('talgalili/installr')
If you are using the Rgui, you will see a new menu added on your top right (just by "help"), giving you the option to update R, or install new software.
For command line use you can update R by running:
if(!require("installr")) install.packages('installr') library("installr") updateR() # this will open dialog boxes to take you through the steps. # OR use: # updateR(TRUE) # this will use common defaults and will be the safest/fastest option
Or install a new software simply by running:
library("installr") installr() # user can easily select (via a GUI interface) a software to install.
If you one of the followiong errors from some commands:
Error in download.file(URL, destfile = ...) : unsupported URL scheme
install.RStudio() Error in file(con, "r") : cannot open the connection updateR() Error in file(con, "r") : cannot open the connection
Sources: https://stackoverflow.com/questions/21857264/error-in-download-file-unsupported-url-scheme https://stackoverflow.com/questions/19890633/r-produces-unsupported-url-scheme-error-when-getting-data-from-https-sites
You are welcome to:
You can see the most recent changes to the package in the NEWS.md file:
R install/update/uninstall related functions:
Installing software from withing R:
Operation system managing functions
CRAN and network related functions:
There are a few more functions that you could see in the help files...
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.