rv add
Used to quickly add packages as simple dependencies to the config file, then sync.
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”--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.
Example
Section titled “Example”[project]name = "my project"r_version = "4.4"
repositories = [ { alias = "PPM", url = "https://packagemanager.posit.co/cran/latest" }]
dependencies = [ "tibble",]
% rv add dplyr+ dplyr (1.1.4, binary from https://packagemanager.posit.co/cran/latest) in 1ms+ generics (0.1.4, binary from https://packagemanager.posit.co/cran/latest) in 1ms+ R6 (2.6.1, binary from https://packagemanager.posit.co/cran/latest) in 1ms+ tidyselect (1.2.1, binary from https://packagemanager.posit.co/cran/latest) in 0ms+ withr (3.0.2, binary from https://packagemanager.posit.co/cran/latest) in 3ms
[project]name = "my project"r_version = "4.4"
repositories = [ { alias = "PPM", url = "https://packagemanager.posit.co/cran/latest" }]
dependencies = [ "tibble", "dplyr",]