Run pkg_summary() on several CRAN releases of one package to see how it
grew over time. By default n releases are picked evenly across the
package's history, always including the first and the latest; or name the
versions you want.
Usage
pkg_history(
package,
versions = NULL,
n = 5,
include_ignored = FALSE,
quiet = FALSE,
cache = c("session", "persistent", "none")
)Arguments
- package
Name of a CRAN package, such as
"dplyr".- versions
Optional character vector of versions to analyse, e.g.
c("0.8.0", "1.0.0"). Seepkg_versions()for what is available. If given,nis ignored.- n
Number of releases to pick when
versionsis not given. If the package hasnreleases or fewer, all are used.- include_ignored
If
TRUE, also analyse files matched by the package's.Rbuildignore. Version-control folders and R's built-in build exclusions are always skipped.- quiet
If
TRUE, suppress progress messages.- cache
Where to keep downloaded GitHub and CRAN packages:
"session"(default): a temporary folder, removed when R closes."persistent": a user cache folder kept across R sessions. Only fixed versions are stored there: CRAN releases and GitHub refs that look like a commit SHA or a version tag ("owner/repo@v1.2.0"). Requests that can change over time (no ref, or a branch) always fetch the latest code and use the session cache instead."none": always download afresh.
Use
pkg_cache_clear()to empty a cache.
Value
A pkginspectr_tbl like pkg_summary(), with one row per release,
sorted by version number (oldest first), and an extra date column after version. Plot it with
pkg_plot(type = "metric") to compare releases side by side.
Details
Each release is downloaded from CRAN. Old releases never change, so
cache = "persistent" is a good choice if you will revisit them.
See also
pkg_versions() to list the releases.
