remotes v2.0.0

0

Monthly downloads

0th

Percentile

R Package Installation from Remote Repositories, Including 'GitHub'

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'.

Readme

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

  • Installers:
    • Install packages with their dependencies.
    • Install from GitHub, GitLab, BitBucket.
    • Install from git and subversion repositories.
    • Install from local files or URLs.
    • Install the dependencies of a local package tree.
    • Install specific package versions from CRAN.
  • Supports BioConductor packages.
  • Supports the Remotes field in DESCRIPTION. See more here.
  • Supports the Additional_repositories field in DESCRIPTION.
  • Can install itself from GitHub (see below).
  • Does not depend on other R packages.
  • Does not contain compiled code, so no compiler is needed.
  • Does not need any external software (for most of the functionality at least).

Installation

Install the relesed 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/pkgconfig@v2.0.0")

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

remotes::install_github("gaborcsardi/pkgconfig@*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. The BiocInstaller package, which is needed to install them, is also automatically installed temporarily.

Currently supported remote types

  • GitHub repositories via install_github.
  • Bitbucket repositories via install_bitbucket.
  • Generic git repositories via install_git. They need either a system git installation, or the git2r R package.
  • Local directories or package archive files via install_local.
  • Remote package archive files via install_url.
  • Packages in subversion repositories via install_svn. They need a system subversion installation.
  • Specific package versions from CRAN or other CRAN-like repositories via install_version. This includes outdated and archived packages as well.
  • All dependencies of a package in a local directory via install_deps.

Download methods

  • For R older than 3.2, the curl package is required as remotes falls back to curl::curl_download in that case
  • For R newer than 3.3, default download.file() method is used. (method = "auto")
  • For in between versions,
    • method = "wininet" is used on windows OS
    • method = "libcurl" is used on other OS, if available.

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.

Environment variables

  • Setting R_REMOTES_STANDALONE=true forces remotes to work in standalone mode and avoid loading its optional dependencies (curl, git2 and pkgbuild currently. See "Standalone mode" above.

  • Setting R_REMOTES_NO_ERRORS_FROM_WARNINGS=true avoids stopping the installation for warning messages. Warnings usually mean installation errors, so by default remotes stops for a warning. However, sometimes other warnings might happen, that could be ignored by setting this environment variable.

License

GPL (>= 2) © Mango Solutions, RStudio

Functions in remotes

Name Description
package_deps Find all dependencies of a CRAN or dev package.
install_url Install a package from a url
install_version Install specified version of a CRAN package.
install_github Attempts to install a package directly from GitHub.
install_gitlab Install a package from GitLab
update_packages Update packages that are missing or out-of-date.
install_local Install a package from a local file
install_svn Install a package from a SVN repository
install_git Install a package from a git repository
standardise_dep Standardise dependencies using the same logical as install.packages
parse-git-repo Parse a remote git repo specification
install_bioc Install a package from a Bioconductor repository
install_bitbucket Install a package directly from bitbucket
github_pull GitHub references
gitlab_pat Retrieve GitLab personal access token.
install_cran Attempts to install a package from CRAN.
install_dev Install the development version of a package
install_deps Install package dependencies if needed.
bioc_install_repos Deduce the URLs of the BioConductor repositories
download_version Download a specified version of a CRAN package
No Results!

Vignettes of remotes

Name
dependencies.Rmd
No Results!

Last month downloads

Details

License GPL (>= 2)
URL https://github.com/r-lib/remotes#readme
BugReports https://github.com/r-lib/remotes/issues
VignetteBuilder knitr
RoxygenNote 6.1.0
SystemRequirements Subversion for install_svn, git for install_git
Encoding UTF-8
NeedsCompilation no
Packaged 2018-10-11 20:01:07 UTC; gaborcsardi
Repository CRAN
Date/Publication 2018-10-11 20:20:03 UTC

Include our badge in your README

[![Rdoc](http://www.rdocumentation.org/badges/version/remotes)](http://www.rdocumentation.org/packages/remotes)