Project Status
One of the benefits of rv
is the ability to see what will happen before it occurs, as seen in the --dry-run
flags in
the package installation section. As part of this, rv
has two commands to indicate the status
of the project, displaying the information differently depending on your needs.
rv summary
Section titled “rv summary”rv summary
is a way to inspect your project on a global level. It indicates information about the detected system
(including R version), how many packages are installed, how many packages need to be installed/removed, where packages come from,
and how many packages are available in the repositories.
rv summary [OPTIONS]
Options
Section titled “Options”--r-version
- Specify an R version different than the one in the config. This allows you to see what would occur if the project was changed to a different R version. The R version does not need to be on the system
Example
Section titled “Example”In this example, we started out with tibble
installed and want to install the dev version of dplyr
from GitHub.
[project]name = "example"r_version = "4.4"
repositories = [ { alias = "PPM", url = "https://packagemanager.posit.co/cran/latest" },]
dependencies = [ "tibble", { name = "dplyr", git = "https://github.com/tidyverse/dplyr", branch = "main" },]
$ rv summary== System Information ==OS: macos (arm64)R Version: 4.4
Num Workers for Sync: 8 (8 cpus available)Cache Location: ~/.cache/rv
== Dependencies ==Library: rv/library/4.4/arm64Installed: 11/16
Package Sources:PPM: 11/15 binary packageshttps://github.com/tidyverse/dplyr: 0/1 source packages
Installation Summary:PPM: 1/4 in cache, 3/4 to downloadhttps://github.com/tidyverse/dplyr: 1/1 in cache (1 to compile)
== Remote ==PPM (https://packagemanager.posit.co/cran/latest): 19429 binary packages, 22420 source packages
rv plan
Section titled “rv plan”For a more granual look, rv plan
will show the results should you run rv sync
.
rv plan [OPTIONS]
Options
Section titled “Options”--r-version
- Specify an R version different than the one in the config. This allows you to see what would occur if the project was changed to a different R version. The R version does not need to be on the system--upgrade
- The same asrv upgrade --dry-run
Example
Section titled “Example”The same scenario as the example above, this time wanting to see a granual installation plan.
[project]name = "example"r_version = "4.4"
repositories = [ { alias = "PPM", url = "https://packagemanager.posit.co/cran/latest" },]
dependencies = [ "tibble", { name = "dplyr", git = "https://github.com/tidyverse/dplyr", branch = "main" },]
$ rv plan+ dplyr (1.1.4.9000, source from https://github.com/tidyverse/dplyr (branch: main))+ generics (0.1.4, binary from https://packagemanager.posit.co/cran/latest)+ R6 (2.6.1, binary from https://packagemanager.posit.co/cran/latest)+ tidyselect (1.2.1, binary from https://packagemanager.posit.co/cran/latest)+ withr (3.0.2, binary from https://packagemanager.posit.co/cran/latest)