get_val: Get Value or Default

View source: R/utils-misc.R

get_valR Documentation

Get Value or Default

Description

Get Value or Default

Usage

get_val(x, key = NULL, ..., .invalids = c("null", "na"))

Arguments

x

a list, or environment, or just any R object

key

the name to obtain from x. Default is NULL

...

if the value is invalid, the default value to return

.invalids

what counts as invalid? Default is NULL and NA, represented by "null" and "na"


beauchamplab/rave documentation built on Feb. 23, 2024, 7:20 a.m.