The is
functions tests if an object (or an object in its attribute)
inherits particular class and returns TRUE
if it does, otherwise FALSE
.
is_edibble_design
checks if it inheritsedbl_design
.is_edibble_graph
checks if it inheritsedbl_graph
.is_edibble_table
checks if it inheritsedbl_table
is_edibble
checks if the object inheritsedbl
. The search is quite simple, it checks if the object isedbl_design
, failing that it looks to see if the attribute "design" of the object isedbl_design
.is_named_design
check if it inheritsNamedDesign
.
The get
functions extracts the requested edibble component (table, graph,
or design) from the object if possible.
edbl_design
tries to getedbl_design
.edbl_table
tries to getedbl_table
with no design attribute.edbl_graph
tries to getedbl_graph
.
Usage
is_edibble_design(x)
is_named_design(x)
is_edibble_table(x)
is_edibble_graph(x)
is_edibble(x)
is_edibble_levels(x)
is_nest_levels(x)
is_cross_levels(x)
edbl_design(x)
edbl_table(x)
Examples
is_edibble_design(takeout())
#> → No name was supplied so selecting a random named experimental design...
#> → Selected Strip-Plot DesignSelected Strip-Unit Design
#> [1] FALSE