check-type: Check Data Types

Description Usage Arguments Value Author(s) See Also

Description

Check Data Types

Usage

1
2
3
assert_type(x, expected)

assert_scalar(x, expected)

Arguments

x

An object to be checked.

expected

A character string specifying the expected type. It must be one of "list", "atomic", "vector", "numeric", "integer", "double", "character" or "logical".

Value

Throws an error, if any, and returns x invisibly otherwise.

Author(s)

N. Frerebeau

See Also

Other validation methods: check-attribute, check-data, check-graph, check-matrix, check-numeric, validate()


arkhe documentation built on Sept. 18, 2021, 5:07 p.m.