prop_names {S7}R Documentation

Property introspection

Description

Usage

prop_names(object)

prop_exists(object, name)

Arguments

object

An object from a S7 class

name

The name of the parameter as a character. Partial matching is not performed.

Value

prop_names() returns a character vector; prop_exists() returns a single TRUE or FALSE.

Examples

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")

[Package S7 version 0.1.1 Index]