Skip to contents

`NA`s are not ignored and any vector with `NA`s will fail unless the whole vector is `NA`.

Usage

is_incrementing(x)

Arguments

x

A vector

Value

TRUE if the vector is sorted

Examples

is_incrementing(1:5) # TRUE
#> [1] TRUE
is_incrementing(letters[1:5]) # TRUE
#> [1] TRUE
is_incrementing(c(4, 3, 0)) # FALSE
#> [1] FALSE