Test if an object is not sorted (in increasing order), without the cost of sorting it.
is.unsorted(x, na.rm = FALSE, strictly = FALSE)
| Parameter | Description |
|---|---|
x |
an R object with a class or a numeric, complex, character, logical or raw vector. |
na.rm |
logical. Should missing values be removed before checking? |
strictly |
logical indicating if the check should be for strictly increasing values. |