Compare lock files
Arguments
- x
A list of lists or list of 'rt_tibble'. An output from
read_lock()
.
Value
A tibble with following columns:
a,b: Labels for first and second lockfile compared
rver_a,rver_b: R versions for the lock files compared
renvver_a,renvver_b: renv package versions
jaccard: Jaccard's index. 0 meaning no packages are shared and 1 meaning all
packages are shared between lock files
pkgs_len_a,pkgs_len_b: Number of packages
pkgs_len_unique_a,pkgs_len_unique_b: Number of pkgs only in first or second lock file
pkgs_common_len: Number of pkgs shared between the two lock files (intersect)
pkgs_total_len: Number of total unique pkgs in both lock files (union)
pkgs_a,pkgs_b: A list of character vector of pkg names in first or second lock file
pkgs_unique_a,pkgs_unique_b: A list of character vector of unique packages in first or second lock file
pkgs_common: A list of character vector of pkgs shared between the two lock files (intersect)
pkgs_total: A list of character vector of all unique pkgs in both lock files (union)
Examples
paths <- c(
file.path(system.file("extdata", package = "renvtools"), "renv-r4.4.1.lock"),
file.path(system.file("extdata", package = "renvtools"), "renv-r4.3.2.lock")
)
l <- read_lock(paths, format = "list")
compare_lock(l)
#> # A tibble: 1 x 19
#> a b rver_a rver_b renvver_a renvver_b jaccard pkgs_len_a pkgs_len_b
#> <chr> <chr> <chr> <chr> <chr> <chr> <dbl> <int> <int>
#> 1 lf_1 lf_2 4.4.1 4.3.2 1.0.7 1.0.3 0.432 294 668
#> # i 10 more variables: pkgs_len_unique_a <int>, pkgs_len_unique_b <int>,
#> # pkgs_len_common <int>, pkgs_len_total <int>, pkgs_a <list>, pkgs_b <list>,
#> # pkgs_unique_a <list>, pkgs_unique_b <list>, pkgs_common <list>,
#> # pkgs_total <list>