Tests if input is a valid unit of distance.

is_unit_dist(input, error = FALSE)

Arguments

input

Character vector of distance units. Obtain valid input options with validUnitsOfLength().

error

Logical. If TRUE and the input is invalid the function throws an error.

Value

Logical value and/or error if argument error is TRUE.