fgeo.tool (version 1.2.5)

check_crucial_names: 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

Run this code
# NOT RUN {
v <- c(x = 1)
check_crucial_names(v, "x")

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

Run the code above in your browser using DataCamp Workspace