Skip to contents

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

N. Frerebeau