check_crucial_names: Check if an object contains specific names.

View source: R/check_crucial_names.R

check_crucial_namesR Documentation

Check if an object contains specific names.

Description

Check if an object contains specific names.

Usage

check_crucial_names(x, nms)

Arguments

x

A named object.

nms

String; names expected to be found in x.

Value

Invisible x, or an error with informative message.

See Also

Other functions to check inputs: flag_if_group(), is_multiple()

Other functions for developers: extract_insensitive(), flag_if_group(), is_multiple(), nms_try_rename(), rename_matches(), type_ensure()

Examples

v <- c(x = 1)
check_crucial_names(v, "x")

dfm <- data.frame(x = 1)
check_crucial_names(dfm, "x")

fgeo.tool documentation built on Sept. 3, 2022, 5:05 p.m.