Records what is actually installed in a library, which is the evidence an IQ protocol asks for: package, version, library path, the R version the package was built under, where it came from, and an MD5 checksum of the installed DESCRIPTION so a later run can prove the installation has not been altered. The session context (R version, platform, OS) is attached to the record.

iq_record(pkgs = NULL, lib = .libPaths())

# S3 method for class 'valpack_iq'
print(x, ...)

Arguments

pkgs

Character vector of package names, or NULL (the default) for every package installed in lib.

lib

Library paths to scan.

installed_tests records whether the package directory contains a tests/ directory, i.e. whether it was installed with --install-tests. It belongs in the IQ because it bounds what any later OQ can claim: with no installed suite, oq_record() with types = "tests" can only ever record skips. On the library this package was developed against, 7 of 580 packages had one.

x

A valpack_iq object.

...

Ignored.

Value

An object of class valpack_iq: a list with packages (a tibble of package, version, library, built_r, source, repository, description_md5, priority, needs_compilation, installed_tests) and session.

Details

Nothing here is inferred from a lockfile or a repository listing — every field is read off the installed package on disk.

Examples

iq <- iq_record(c("tibble", "jsonlite"))
iq
#> 
#> ── valpack installation qualification ──────────────────────────────────────────
#>  R version 4.5.2 (2025-10-31) | x86_64-pc-linux-gnu | Linux 7.0.0-14-generic
#>  Libraries: /tmp/RtmpZtJJJ6/temp_libpathfb7902312fb71, /usr/local/lib/R/site-library, /usr/lib/R/site-library, /usr/lib/R/library
#>  2 packages: CRAN=2
#>  0/2 installed with --install-tests (an OQ can only run test suites for those)
#>  Recorded at 2026-08-03 04:47:38 UTC
#> # A tibble: 2 × 10
#>   package  version library    built_r source repository description_md5 priority
#>   <chr>    <chr>   <chr>      <chr>   <chr>  <chr>      <chr>           <chr>   
#> 1 tibble   3.3.1   /usr/loca… 4.5.2   CRAN   https://c… 95d08b59dd40a6… NA      
#> 2 jsonlite 2.0.0   /usr/loca… 4.5.2   CRAN   https://c… 281ddbf8581f58… NA      
#> # ℹ 2 more variables: needs_compilation <chr>, installed_tests <lgl>
iq$packages$description_md5
#> [1] "95d08b59dd40a60f90d095c058b4ccce" "281ddbf8581f58912555190835dd5331"
iq$session$platform
#> [1] "x86_64-pc-linux-gnu"