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()


nfrerebeau/codex documentation built on May 1, 2024, 6:11 a.m.