Get package version from lockfile
Arguments
- x
A 'rt_list' or 'rt_tibble' class object. An single output from
read_lock()
.- pkg
package name with correct case
Examples
paths <- file.path(system.file("extdata", package = "renvtools"), "renv-r4.4.1.lock")
l <- read_lock(paths, format = "list")
get_version_pkg(l, "renv")
#> [1] "1.0.7"