getOptionalValue: Get an optional value from data, using a default if not...

View source: R/misc.R

getOptionalValueR Documentation

Get an optional value from data, using a default if not present

Description

Use this function for optional fields where no warning should be generated if missing.

Usage

getOptionalValue(data, field_name, default_value = NA)

Arguments

data

The data structure to extract from

field_name

The name of the field to extract

default_value

Value to return if the field doesn't exist

Value

The field value if it exists, otherwise the default_value


rmzqc documentation built on June 8, 2025, 1:59 p.m.