check_names: Logical test to see if name(s) are in an object

Description Usage Arguments Value Examples

Description

This function tests to see if names x are found in an object and returns TRUE if they are

Usage

1
check_names(x, obj)

Arguments

x

Character. Regular expression of name

obj

Named object. Can be a vector, list, data.frame, or any other object that has a names attribute

Value

Logical. TRUE if names x exist in obj

Examples

1
2
3
dat <- data.frame(a = 1, b = 2)
check_names("a", dat)
check_names("c", dat)

inspktrgadget/gadgetSim documentation built on May 10, 2019, 9:51 a.m.