Skip to contents

Check Object Length(s)

Usage

assert_length(x, expected, allow_empty = empty, empty = FALSE)

assert_lengths(x, expected)

Arguments

x

An object to be checked.

expected

An appropriate expected value.

allow_empty

A logical scalar: should empty object be allowed?

empty

Deprecated.

Value

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

Author

N. Frerebeau