README.md

remotes

Install R Packages from GitHub, BitBucket, or other local or remote repositories

Project Status: Active - The project has reached a stable, usable state and is being actively developed. Linux Build Status Windows Build status CRAN RStudio mirror downloads Coverage Status

Download and install R packages stored in GitHub, BitBucket, or plain subversion or git repositories. This package is a lightweight replacement of the install_* functions in devtools. Indeed most of the code was copied over from devtools.

Features

Installation

Install the released version of remotes from CRAN:

install.packages("remotes")

You can also install remotes from GitHub. If you already have a previous version of remotes installed, you can use that to install the development version:

remotes::install_github("r-lib/remotes")

Alternatively, you can also call the supplied install-github.R file directly, from within R:

source("https://raw.githubusercontent.com/r-lib/remotes/master/install-github.R")$value("r-lib/remotes")

The https://install-github.me service is also based on remotes. You can use it to install any R package from GitHub via sourcing a URL. E.g. to install remotes itself:

source("https://install-github.me/r-lib/remotes")

Usage

Note that most of the examples here use GitHub. See below for other supported repository types.

To install the latest version of a package in the master branch from GitHub, you can use the user/repo form. Note that user can also be an organization:

remotes::install_github("r-lib/conflicted")

If the R package is inside a subdirectory of the root directory, then give this subdirectory as well:

remotes::install_github("dmlc/xgboost/R-package")

To install a certain branch or commit or tag, append it to the repo name, after an @:

remotes::install_github("gaborcsardi/[email protected]")

To install the latest release, append @*release to the repo name:

remotes::install_github("gaborcsardi/[email protected]*release")

To install a pull request, append # and the id (an integer number) of the pull request to the repo name:

remotes::install_github("r-lib/pkgconfig#7")

Dependencies

Dependencies are automatically installed from CRAN. By default, outdated dependencies are automatically upgraded. In interactive sessions you can select a subset of the dependencies to upgrade.

Dependencies on GitHub

It is also possible to install dependencies from GitHub or other supported repositories. For this you need to add a Remotes field to the DESCRIPTION file. Its format is:

Remotes: [remote::]repo_spec, [remote::]repo_spec, ...

where repo_spec is any repository specification the corresponding install_() function can handle. If remote:: is missing, github:: is assumed. Other possible values: gitlab::,bitbucket::, git::, local::, svn::, url::, version::, cran::, bioc::.

See more about the Remotes field in this vignette.

Additional repositories

remotes supports the Additional_repositories field in DESCRIPTION. This is a way to specify dependencies from non-CRAN package repositories. See the Writing R extensions manual for details.

Bioconductor packages

Bioconductor packages are automatically detected and their dependencies are installed from Bioconductor.

Currently supported remote types

Download methods

See help("download.file") for informations on these methods and for setting proxies if needed.

Standalone mode

remotes will use the curl, git2r and pkgbuild packages if they are installed to provide faster implementations for some aspects of the install process. However if you are using remotes to install or update these packages (or their reverse dependencies) using them during installation may fail (particularly on Windows).

If you set the environment variable R_REMOTES_STANDALONE=true (e.g. in R Sys.setenv(R_REMOTES_STANDALONE="true")) you can force remotes to operate in standalone mode and use only its internal R implementations. This will allow successful installation of these packages.

Options

remotes uses the following standard R options, see ?options for their details:

It also uses some remotes specific options:

Environment variables

License

GPL (>= 2) © Mango Solutions, RStudio



Try the remotes package in your browser

Any scripts or data that you put into this service are public.

remotes documentation built on June 25, 2019, 1:03 a.m.