Skip to contents

Retrieves a package configuration's default value from the package's configuration metadata (column default_value or default_value_dynamic of <pkg>::pkg_config). If no default value is specified (NULL), nothing is returned (NULL).

Usage

pkg_config_val_default(
  key,
  pkg = utils::packageName(env = parent.frame()),
  env = parent.frame()
)

Arguments

key

Configuration key name. A character scalar.

pkg

Package name. A character scalar. Defaults to the name of the calling package.

env

Environment to evaluate default_value_dynamic in, if necessary.

Value

pkgsnip::return_lbl("r_obj")

See also

Other package configuration functions: augment_pkg_config(), has_pkg_config_val(), pkg_config_val(), print_pkg_config()

Examples

try(
  pal::pkg_config_val_default(key = "gen_pkgdown_ref",
                              pkg = "pkgpurl")
)
#> [1] TRUE