powered by
prop_names(x) returns the names of the properties
prop_names(x)
prop_exists(x, "prop") returns TRUE iif x has property prop.
prop_exists(x, "prop")
TRUE
x
prop
prop_names(object)prop_exists(object, name)
prop_exists(object, name)
prop_names() returns a character vector; prop_exists() returns a single TRUE or FALSE.
prop_names()
prop_exists()
FALSE
An object from a S7 class
The name of the parameter as a character. Partial matching is not performed.
foo <- new_class("foo", properties = list(a = class_character, b = class_integer)) f <- foo() prop_names(f) prop_exists(f, "a") prop_exists(f, "c")
Run the code above in your browser using DataLab