Learn R Programming

edibble (version 1.1.0)

design-helpers: Test and get edibble objects

Description

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 inherits edbl_design.

  • is_edibble_graph checks if it inherits edbl_graph.

  • is_edibble_table checks if it inherits edbl_table

  • is_edibble checks if the object inherits edbl. The search is quite simple, it checks if the object is edbl_design, failing that it looks to see if the attribute "design" of the object is edbl_design.

  • is_named_design check if it inherits NamedDesign.

The get functions extracts the requested edibble component (table, graph, or design) from the object if possible.

  • edbl_design tries to get edbl_design.

  • edbl_table tries to get edbl_table with no design attribute.

  • edbl_graph tries to get edbl_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)

Value

A logical value.

Arguments

x

An object.

Examples

Run this code
is_edibble_design(takeout())

Run the code above in your browser using DataLab