Skip to contents

[Stable] This function checks if a named element exists within a r object

Usage

check_var(obj, x)

check_element(obj, x)

Arguments

obj

r object

x

named element on which existence will be checked

Examples

check_var(mtcars, cyl)
#> [1] TRUE

data_list = list(dat1 = mtcars, dat2 = airmiles)
check_element(data_list, dat1)
#> [1] TRUE
check_element(data_list, dat3)
#> [1] FALSE