rv add
Used to quickly add packages to the config file, then sync.
The rv add command supports adding packages as simple dependencies or with advanced configuration options like specifying repositories, git sources, local paths, URLs, and various installation behaviors.
Using this command may feel similar to install.packages() in which packages can be iteratively added to the project,
just with the additional benefits provided by rv.
rv add [packages]... [OPTIONS]Arguments
Section titled “Arguments”packages- A list of packages, space or comma separated, to add to the project
Options
Section titled “Options”General Options
Section titled “General Options”--dry-run- No changes made to the config or the package library, only reports what would happen if the command was run.--no-sync- Packages are added to the config file, but not sync’ed.
Package Source Options
Section titled “Package Source Options”--repository <ALIAS>- Specify which repository to install from (e.g.,cran,bioc). Creates a table entry with therepositoryfield.--git <URL>- Install from a git repository. Creates a table entry with thegitfield.--tag <TAG>- Specify a git tag (requires--git)--branch <BRANCH>- Specify a git branch (requires--git)--directory <DIR>- Specify subdirectory within git repo (requires--git)
--path <PATH>- Install from a local path. Creates a table entry with thepathfield.--url <URL>- Install from a URL to a package archive. Creates a table entry with theurlfield.
Installation Behavior Options
Section titled “Installation Behavior Options”--force-source- Forces the package to be fetched and installed as source from a repository. Addsforce_source = trueto the dependency entry.--install-suggestions- Install suggested packages. Addsinstall_suggestions = trueto the dependency entry.--dependencies-only- Install only the dependencies of the package, not the package itself. Addsdependencies_only = trueto the dependency entry. Useful when developing a package locally.
Examples
Section titled “Examples”A number of examples demonstrating the various options and capabilities of rv add are shown in the Cookbook section.