Tests if an object has data.frame methods select
, filter
, mutate
, and collect
defined so that we can treat it
like a data.frame.
Usage
check_dataframeish(obj)
assert_dataframeish(obj, .var.name = checkmate::vname(obj), add = NULL)
test_dataframeish(obj)
Arguments
- obj
object to test
- .var.name
character(1) Name of the checked object to print in assertions. Defaults to the heuristic implemented in vname.
- add
checkmate::AssertCollection Collection to store assertion messages. See checkmate::AssertCollection.
Functions
assert_dataframeish()
: checkmate assert function for check_dataframeishtest_dataframeish()
: checkmate test function for check_dataframeish
Examples
check_dataframeish(list())
#> [1] "Must implement the data.frameish methods: filter, mutate, collect"
# FALSE