Skip to contents

Prints a short, friendly explanation for each system package an R package needs and the command to install it. Useful for teaching and for emails to less-experienced collaborators.

Usage

explain(x, platform = NULL, ...)

Arguments

x

A package name, package vector, or sysreqr_plan.

platform

Platform specification accepted by resolve_platform().

...

Passed to check_packages() when x is not a plan.

Value

A character vector of explanation lines, invisibly.

Examples

plan <- check_packages("xml2", platform = "ubuntu-22.04")
explain(plan)
#> System requirement explanation
#> 
#> xml2 needs libxml2-dev.
#> Install it with: apt-get install -y libxml2-dev
#>