Learn R Programming

tbdiag (version 0.1)

equal.lengths: Confirm that all input vectors are the same length.

Description

Confirm that all input vectors are the same length.

Usage

equal.lengths(...)

Arguments

...
Two or more vectors to be compared.

Value

Returns an error if the vectors are of unequal length, returns a warning if only one vector is supplied, and returns nothing if the vectors are of equal length.

Examples

Run this code
## Not run: equal.lengths(rnorm(10), rnorm(10), rnorm(9))
## Not run: equal.lengths(rnorm(10))
## Not run: equal.lengths(rnorm(10), rnorm(10), rnorm(10))

Run the code above in your browser using DataLab