is_defined_with_value: Test existance, class and value of a variable

Description Usage Arguments Examples

Description

A utility function that tests whether an object has been defined by the given name with the given value, and with specified possible classes in the specified environment.

Usage

1
2
is_defined_with_value(name, value, obj_classes = NULL,
  envir = .GlobalEnv)

Arguments

name

the name of the object to search for

value

the value of object

obj_classes

the allowed class(es) of the object. If NULL, no class check is performed

envir

the environment to search in; defaults to global

Examples

1
2
3
x <- 42
is_defined_with_value("x", 42) #TRUE
is_defined_with_value("x", 42, c("numeric", "integer")) #TRUE

MichielNoback/bintestr documentation built on May 9, 2019, 3:27 a.m.