Install a package
install_remote.RdInstall a package
Arguments
- pkg
chrpackage names Required- remote
chrgithub remote- ...
Arguments passed on to
remotes::install_githubrepoRepository address in the format
username/repo[/subdir][@ref|#pull|@*release]. Alternatively, you can specifysubdirand/orrefusing the respective parameters (see below); if both are specified, the values inrepotake precedence.refDesired git reference. Could be a commit, tag, or branch name, or a call to
github_pull()orgithub_release(). Defaults to"HEAD", which means the default branch on GitHub and for git remotes. See setting-the-default-branch for more details.subdirSubdirectory within repo that contains the R package.
auth_tokenTo install from a private repo, generate a personal access token (PAT) with at least repo scope in https://github.com/settings/tokens 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_PATenvironment variable.hostGitHub API host to use. Override with your GitHub enterprise hostname, for example,
"github.hostname.com/api/v3".dependenciesWhich dependencies do you want to check? Can be a character vector (selecting from "Depends", "Imports", "LinkingTo", "Suggests", or "Enhances"), or a logical vector.
TRUEis shorthand for "Depends", "Imports", "LinkingTo" and "Suggests".NAis shorthand for "Depends", "Imports" and "LinkingTo" and is the default.FALSEis shorthand for no dependencies (i.e. just check this package, not its dependencies).The value "soft" means the same as
TRUE, "hard" means the same asNA.You can also specify dependencies from one or more additional fields, common ones include:
Config/Needs/website - for dependencies used in building the pkgdown site.
Config/Needs/coverage for dependencies used in calculating test coverage.
upgradeShould package dependencies be upgraded? One of "default", "ask", "always", or "never". "default" respects the value of the
R_REMOTES_UPGRADEenvironment variable if set, and falls back to "ask" if unset. "ask" prompts the user for which out of date packages to upgrade. For non-interactive sessions "ask" is equivalent to "always".TRUEandFALSEare also accepted and correspond to "always" and "never" respectively.forceForce installation, even if the remote state has not changed since the previous install.
quietIf
TRUE, suppress output.buildIf
TRUEbuild the package before installing.build_optsOptions to pass to
R CMD build, only used whenbuildisTRUE.build_manualIf
FALSE, don't build PDF manual ('--no-manual').build_vignettesIf
FALSE, don't build package vignettes ('--no-build-vignettes').reposA character vector giving repositories to use.
typeType of package to
update.
- to_desc
lglAdd the package dependency to the DESCRIPTION file?- snapshot
lglRunrenv::snapshot
Value
Installs the package, add the version to the DESCRIPTION file, and snapshots the package to the renv.lock file if present.
See also
Other project setup:
creds_to_renviron(),
fun_docs_table(),
ignore_files(),
key_pairs_duplicated(),
key_pairs_text(),
use_UU_reimports(),
use_reimport(),
write_to_rprofile()