check_entity: Check if an argument is from the Entity class.

Description Usage Arguments Value

View source: R/checkmate.R

Description

Check if an argument is from the Entity class.

Usage

1
2
3
4
5
6
7
check_entity(x)

assert_entity(x, .var.name = checkmate::vname(x), add = NULL)

test_entity(x)

expect_entity(x, info = NULL, label = vname(x))

Arguments

x

(any)
An object to be checked.

.var.name

[character(1)]
The custom name for x as passed to any assert* function. Defaults to a heuristic name lookup.

add

checkmate::AssertCollection
Collection to store assertions. See checkmate::AssertCollection.

info

[character(1)]
See expect_that

label

[character(1)]
See expect_that

Value

a logical value if TRUE or an character containing an error message.


dymium-org/dymiumCore documentation built on July 18, 2021, 5:10 p.m.