Skip to contents

From a given R package name, identify it's system requirements.

Usage

get_pkg_sysreqs(pkg, os, os_release, verbose = TRUE)

Arguments

pkg

package name as a scalar character

os

the operating system. See fetch_systems().

os_release

the version for os.

verbose

default TRUE. Whether to inform of missing packages.

Value

A named list for each system requirement identified where each element is a named list for each required system library containing the elements:

  • dependencies: the required library names

  • pre_installs: a character vector of commands typically required before installation

  • post_installs: a character vector of commands typically required after installation

Examples

get_pkg_sysreqs("igraph", "centos", "8")
#> $glpk
#> $glpk$dependencies
#> [1] "glpk-devel"
#> 
#> $glpk$pre_installs
#> [1] "dnf install -y epel-release"
#> 
#> $glpk$post_installs
#> [1] NA
#> 
#> 
#> $gmp
#> $gmp$dependencies
#> [1] "gmp-devel"
#> 
#> $gmp$pre_installs
#> [1] NA
#> 
#> $gmp$post_installs
#> [1] NA
#> 
#> 
#> $libxml2
#> $libxml2$dependencies
#> [1] "libxml2-devel"
#> 
#> $libxml2$pre_installs
#> [1] NA
#> 
#> $libxml2$post_installs
#> [1] NA
#> 
#>