check-type: Check Data Types

check-typeR Documentation

Check Data Types

Description

Check Data Types

Usage

assert_type(x, expected)

assert_scalar(x, expected)

assert_function(x)

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-matrix, check-numeric-comparison, check-numeric-trend, check-numeric, needs(), validate()


arkhe documentation built on Nov. 17, 2023, 5:09 p.m.