Skip to contents

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.

Value

see the checkmate package for more information on check/assert/test functions

Functions

  • assert_dataframeish(): checkmate assert function for check_dataframeish

  • test_dataframeish(): checkmate test function for check_dataframeish

Examples

check_dataframeish(list())
#> [1] "Must implement the data.frameish methods: filter, mutate, collect"
# FALSE