assert_length: Check Object Length/Dimensions

View source: R/assert.R

assert_lengthR Documentation

Check Object Length/Dimensions

Description

Check Object Length/Dimensions

Usage

assert_length(x, expected, empty = FALSE)

assert_lengths(x, expected)

assert_empty(x)

assert_filled(x)

assert_dimensions(x, expected)

Arguments

x

An object to be checked.

expected

An appropriate expected value.

empty

A logical scalar: should empty objects be ignored?

Value

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

Author(s)

N. Frerebeau

See Also

Other validation methods: assert_constant(), assert_data, assert_lower(), assert_names(), assert_numeric, assert_package(), assert_square(), assert_type(), validate()


tesselle/arkhe documentation built on Feb. 22, 2024, 8:18 p.m.