first_valid_value: Select the first valid value

View source: R/first_valid_value.R

first_valid_valueR Documentation

Select the first valid value

Description

From a vector or list of values, select the first valid value, valid being defined as a value that is not NULL or NA and has, after being trimmed of whitespace, a nonzero length. Optionally, only look at the element with a given name.

Usage

first_valid_value(x, selectName = NULL)

Arguments

x

The vector or list.

selectName

Optionally, the name to look at.

Value

The first valid value (or NULL).


preregr documentation built on May 31, 2023, 7:10 p.m.