assert_is_table(x)
is_table(x, .xname = get_name_in_parent(x))
is_table
wraps is.table
, providing more
information on failure. assert_is_table
returns nothing but
throws an error if is_table
returns FALSE
.is.table
.assert_is_table(table(sample(letters, 100, replace = TRUE)))
Run the code above in your browser using DataLab