Package remotes December 21, 2017 Title R Package Installation from Remote Repositories, Including 'GitHub' Version 1.1.1 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'. License GPL (>= 2) URL https://github.com/r-lib/remotes#readme BugReports https://github.com/r-lib/remotes/issues Imports methods, utils Suggests curl, git2r, mockery, pingr, testthat, withr Depends R (>= 3.0.0) RoxygenNote 6.0.1 SystemRequirements Subversion for install_svn, git for install_git Encoding UTF-8 NeedsCompilation no Author Gábor Csárdi [aut, cre], Hadley Wickham [aut], Winston Chang [aut], Jim Hester [aut], RStudio [cph], Martin Morgan [aut], Dan Tenenbaum [aut], Mango Solutions [cph] Maintainer Gábor Csárdi <csardi.gabor@gmail.com> Repository CRAN Date/Publication 2017-12-20 23:50:46 UTC 1
2 download_version R topics documented: bioc_install_repos...................................... 2 download_version...................................... 2 github_pull......................................... 3 install_bitbucket....................................... 4 install_deps......................................... 5 install_git.......................................... 6 install_github........................................ 6 install_local......................................... 8 install_svn.......................................... 8 install_url.......................................... 9 install_version........................................ 10 package_deps........................................ 10 parse-git-repo........................................ 12 update_packages...................................... 13 Index 14 bioc_install_repos Deduce the URLs of the BioConductor repositories Value Deduce the URLs of the BioConductor repositories bioc_install_repos() A named character vector of the URLs of the BioConductor repositories, appropriate for the current R version. download_version Download a specified version of a CRAN package It downloads the package to a temporary file, and returns the name of the file. download_version(package, version = NULL, repos = getoption("repos"), type = getoption("pkgtype"),...)
github_pull 3 package version repos type package name If the specified version is NULL or the same as the most recent version of the package, this function simply calls install.packages. Otherwise, it looks at the list of archived source tarballs and tries to install an older version instead. character vector, the base URL(s) of the repositories to use, e.g., the URL of a CRAN mirror such as "https://cloud.r-project.org". For more details on supported URL schemes see url. Can be NULL to install from local files, directories or URLs: this will be inferred by extension from pkgs if of length one. character, indicating the type of package to download and install. Will be "source" except on Windows and some macos builds: see the section on Binary packages for those.... Other arguments passed on to install.packages. Value Name of the downloaded file. github_pull GitHub references Use as ref parameter to install_github. Allows installing a specific pull request or the latest release. github_pull(pull) github_release() pull The pull request to install See Also install_github
4 install_bitbucket install_bitbucket Install a package directly from bitbucket This function is vectorised so you can install multiple packages in a single command. install_bitbucket(repo, ref = "master", subdir = NULL, auth_user = NULL, password = NULL,...) repo ref subdir auth_user password Repository address in the format username/repo[/subdir][@ref #pull]. Alternatively, you can specify subdir and/or ref using the respective parameters (see below); if both is specified, the values in repo take precedence. Desired git reference; could be a commit, tag, or branch name. Defaults to master. subdirectory within repo that contains the R package. your account username if you re attempting to install a package hosted in a private repository (and your username is different to username) your password... Other arguments passed on to install.packages. See Also Bitbucket API docs: https://confluence.atlassian.com/bitbucket/use-the-bitbucket-cloud-rest-apis-222724 html install_bitbucket("sulab/mygene.r@default") install_bitbucket("dannavarro/lsr-package")
install_deps 5 install_deps Install package dependencies if needed. Install package dependencies if needed. install_deps(pkgdir = ".", dependencies = NA, threads = getoption("ncpus", 1), repos = getoption("repos"), type = getoption("pkgtype"),..., upgrade = TRUE, quiet = FALSE) pkgdir dependencies threads repos type path to a package directory, or to a package tarball. Which dependencies do you want to check? Can be a character vector (selecting from "Depends", "Imports", "LinkingTo", "Suggests", or "Enhances"), or a logical vector. TRUE is shorthand for "Depends", "Imports", "LinkingTo" and "Suggests". NA is shorthand for "Depends", "Imports" and "LinkingTo" and is the default. FALSE is shorthand for no dependencies (i.e. just check this package, not its dependencies). Number of threads to start, passed to install.packages as Ncpus. A character vector giving repositories to use. Type of package to update. If "both", will switch automatically to "binary" to avoid interactive prompts during package installation.... additional arguments passed to install.packages. upgrade quiet If TRUE, also upgrade any of out date dependencies. If TRUE, suppress output. install_deps(".")
6 install_github install_git Install a package from a git repository It is vectorised so you can install multiple packages with a single command. You do not need to have the git2r package, or an external git client installed. install_git(url, subdir = NULL, branch = NULL, git = c("auto", "git2r", "external"),...) url subdir branch git Location of package. The url should point to a public or private repository. A sub-directory within a git repository that may contain the package we are interested in installing. Name of branch or tag to use, if not master. Whether to use the git2r package, or an external git client via system. Default is git2r if it is installed, otherwise an external git installation.... passed on to install.packages install_git("git://github.com/hadley/stringr.git") install_git("git://github.com/hadley/stringr.git", branch = "stringr-0.2") install_github Attempts to install a package directly from GitHub. This function is vectorised on repo so you can install multiple packages in a single command. install_github(repo, username = NULL, ref = "master", subdir = NULL, auth_token = github_pat(), host = "api.github.com",...)
install_github 7 repo username ref subdir auth_token host Repository address in the format username/repo[/subdir][@ref #pull]. Alternatively, you can specify subdir and/or ref using the respective parameters (see below); if both is specified, the values in repo take precedence. User name. Deprecated: please include username in the repo Desired git reference. Could be a commit, tag, or branch name, or a call to github_pull. Defaults to "master". subdirectory within repo that contains the R package. To install from a private repo, generate a personal access token (PAT) in https: //github.com/settings/applications and supply to this argument. This is safer than using a password because you can easily delete a PAT without affecting any others. Defaults to the GITHUB_PAT environment variable. GitHub API host to use. Override with your GitHub enterprise hostname, for example, "github.hostname.com/api/v3".... Other arguments passed on to install.packages. Details Attempting to install from a source repository that uses submodules raises a warning. Because the zipped sources provided by GitHub do not include submodules, this may lead to unexpected behaviour or compilation failure in source packages. In this case, cloning the repository manually may yield better results. See Also github_pull install_github("klutometis/roxygen") install_github("wch/ggplot2") install_github(c("rstudio/httpuv", "rstudio/shiny")) install_github(c("hadley/httr@v0.4", "klutometis/roxygen#142", "mfrasca/r-logging/pkg")) # To install from a private repo, use auth_token with a token # from https://github.com/settings/applications. You only need the # repo scope. Best practice is to save your PAT in env var called # GITHUB_PAT. install_github("hadley/private", auth_token = "abc")
8 install_svn install_local Install a package from a local file This function is vectorised so you can install multiple packages in a single command. install_local(path, subdir = NULL,...) path subdir path to local directory, or compressed file (tar, zip, tar.gz tar.bz2, tgz2 or tbz) subdirectory within url bundle that contains the R package.... Other arguments passed on to install.packages. dir <- tempfile() dir.create(dir) pkg <- download.packages("testthat", dir, type = "source") install_local(pkg[, 2]) install_svn Install a package from a SVN repository This function requires svn to be installed on your system in order to be used. install_svn(url, subdir = NULL, args = character(0),..., revision = NULL) url subdir args Location of package. The url should point to a public or private repository. A sub-directory withing a svn repository that contains the package we are interested in installing. A character vector providing extra options to pass on to svn.... Other arguments passed on to install.packages. revision svn revision, if omitted updates to latest
install_url 9 Details It is vectorised so you can install multiple packages with a single command. install_svn("svn://github.com/hadley/stringr/trunk") install_svn("svn://github.com/hadley/httr/branches/oauth") install_url Install a package from a url This function is vectorised so you can install multiple packages in a single command. install_url(url, subdir = NULL,...) url subdir location of package on internet. The url should point to a zip file, a tar file or a bzipped/gzipped tar file. subdirectory within url bundle that contains the R package.... Other arguments passed on to install.packages. install_url("https://github.com/hadley/stringr/archive/master.zip")
10 package_deps install_version Install specified version of a CRAN package. If you are installing an package that contains compiled code, you will need to have an R development environment installed. You can check if you do by running devtools::has_devel (you need the devtools package for this). install_version(package, version = NULL, repos = getoption("repos"), type = getoption("pkgtype"),...) package version repos type package name If the specified version is NULL or the same as the most recent version of the package, this function simply calls install.packages. Otherwise, it looks at the list of archived source tarballs and tries to install an older version instead. character vector, the base URL(s) of the repositories to use, e.g., the URL of a CRAN mirror such as "https://cloud.r-project.org". For more details on supported URL schemes see url. Can be NULL to install from local files, directories or URLs: this will be inferred by extension from pkgs if of length one. character, indicating the type of package to download and install. Will be "source" except on Windows and some macos builds: see the section on Binary packages for those.... Other arguments passed on to install.packages. Author(s) Jeremy Stephens package_deps Find all dependencies of a CRAN or dev package. Find all the dependencies of a package and determine whether they are ahead or behind CRAN. A print() method identifies mismatches (if any) between local and CRAN versions of each dependent package; an update() method installs outdated or missing packages from CRAN. local_package_deps extracts dependencies from a local DESCRIPTION file. dev_package_deps lists the status of the dependencies of a local package.
package_deps 11 package_deps(packages, dependencies = NA, repos = getoption("repos"), type = getoption("pkgtype")) local_package_deps(pkgdir = ".", dependencies = NA) dev_package_deps(pkgdir = ".", dependencies = NA, repos = getoption("repos"), type = getoption("pkgtype")) ## S3 method for class 'package_deps' update(object,..., quiet = FALSE, upgrade = TRUE) Value packages dependencies repos type pkgdir object A character vector of package names. Which dependencies do you want to check? Can be a character vector (selecting from "Depends", "Imports", "LinkingTo", "Suggests", or "Enhances"), or a logical vector. TRUE is shorthand for "Depends", "Imports", "LinkingTo" and "Suggests". NA is shorthand for "Depends", "Imports" and "LinkingTo" and is the default. FALSE is shorthand for no dependencies (i.e. just check this package, not its dependencies). A character vector giving repositories to use. Type of package to update. If "both", will switch automatically to "binary" to avoid interactive prompts during package installation. path to a package directory, or to a package tarball. A package_deps object.... Additional arguments passed to install_packages. quiet upgrade A data.frame with columns: If TRUE, suppress output. If TRUE, also upgrade any of out date dependencies. package installed available diff The dependent package s name, The currently installed version, The version available on CRAN, An integer denoting whether the locally installed version of the package is newer (1), the same (0) or older (-1) t package_deps("devtools") # Use update to update any out-of-date dependencies
12 parse-git-repo update(package_deps("devtools")) parse-git-repo Parse a remote git repo specification A remote repo can be specified in two ways: as a URL parse_github_url() handles HTTPS and SSH remote URLs and various GitHub browser URLs via a shorthand parse_repo_spec() handles this concise form: [username/]repo[/subdir][#pull @ref @*release] parse_repo_spec(repo) parse_github_repo_spec(repo) parse_github_url(repo) repo Character scalar, the repo specification. Value List with members: username, repo, subdir ref, pull, release, some which will be empty. parse_repo_spec("metacran/crandb") parse_repo_spec("jimhester/covr#47") ## pull request parse_repo_spec("jeroen/curl@v0.9.3") ## specific tag parse_repo_spec("tidyverse/dplyr@*release") ## shorthand for latest release parse_repo_spec("r-lib/remotes@550a3c7d3f9e1493a2ba") ## commit SHA parse_github_url("https://github.com/jeroen/curl.git") parse_github_url("git@github.com:metacran/crandb.git") parse_github_url("https://github.com/jimhester/covr") parse_github_url("https://github.example.com/user/repo.git") parse_github_url("git@github.example.com:user/repo.git") parse_github_url("https://github.com/r-lib/remotes/pull/108") parse_github_url("https://github.com/r-lib/remotes/tree/name-of-branch") parse_github_url("https://github.com/r-lib/remotes/commit/1234567") parse_github_url("https://github.com/r-lib/remotes/releases/latest") parse_github_url("https://github.com/r-lib/remotes/releases/tag/1.0.0")
update_packages 13 update_packages Update packages that are missing or out-of-date. Works similarly to install.packages but doesn t install packages that are already installed, and also upgrades out dated dependencies. update_packages(packages, dependencies = NA, repos = getoption("repos"), type = getoption("pkgtype")) packages dependencies repos type Character vector of packages to update. Which dependencies do you want to check? Can be a character vector (selecting from "Depends", "Imports", "LinkingTo", "Suggests", or "Enhances"), or a logical vector. TRUE is shorthand for "Depends", "Imports", "LinkingTo" and "Suggests". NA is shorthand for "Depends", "Imports" and "LinkingTo" and is the default. FALSE is shorthand for no dependencies (i.e. just check this package, not its dependencies). A character vector giving repositories to use. Type of package to update. If "both", will switch automatically to "binary" to avoid interactive prompts during package installation. See Also package_deps to see which packages are out of date/ missing. update_packages("ggplot2") update_packages(c("plyr", "ggplot2"))
Index bioc_install_repos, 2 dev_package_deps (package_deps), 10 download_version, 2 github_pull, 3, 7 github_release (github_pull), 3 install.packages, 3 10, 13 install_bitbucket, 4 install_deps, 5 install_git, 6 install_github, 3, 6 install_local, 8 install_svn, 8 install_url, 9 install_version, 10 local_package_deps (package_deps), 10 package_deps, 10, 13 parse-git-repo, 12 parse_github_repo_spec (parse-git-repo), 12 parse_github_url (parse-git-repo), 12 parse_repo_spec (parse-git-repo), 12 update.package_deps (package_deps), 10 update_packages, 13 url, 3, 10 14