is_incrementing: Check if the vector is sorted numerically or alphanumerically

View source: R/predicates.R

is_incrementingR Documentation

Check if the vector is sorted numerically or alphanumerically

Description

'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
is_incrementing(letters[1:5]) # TRUE
is_incrementing(c(4, 3, 0)) # FALSE

schematic documentation built on June 9, 2025, 5:10 p.m.