Description Usage Arguments Value Note Author(s) See Also
Test if an object is sorted, without the cost of sorting it.
1 |
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. |
A length-one logical value. All objects of length 0 or 1 are
sorted: the result will be NA for objects of length 2 or more
except for atomic vectors and objects with a class (where the >=
or > method is used to compare x[i] with x[i-1] for i in
2:length(x)).
This function is designed for objects with one-dimensional
indices, as described above. data.frame, matrices and other
arrays may give surprising results.
Mark Cowley, 2012-07-16
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.