Learn R Programming

assertive.types (version 0.0-3)

assert_is_table: Is the input a table?

Description

Checks to see if the input is a table.

Usage

assert_is_table(x, severity = getOption("assertive.severity", "stop"))
is_table(x, .xname = get_name_in_parent(x))

Arguments

x
Input to check.
severity
How severe should the consequences of the assertion be? Either "stop", "warning", "message", or "none".
.xname
Not intended to be used directly.

Value

is_table wraps is.table, providing more information on failure. assert_is_table returns nothing but throws an error if is_table returns FALSE.

See Also

is.table.

Examples

Run this code
assert_is_table(table(sample(letters, 100, replace = TRUE)))

Run the code above in your browser using DataLab