Description Usage Arguments Details Value References See Also Examples
Determining the ordering (montonicity) of a vector
1 2 3 | ordering(x, na.rm = TRUE)
monotonicity(x, na.rm = TRUE)
|
x |
numeric vector |
na.rm |
logical; whether to omit |
monotonicty
determines the ordering/sorting of a vector,
one of:
+2: stictly increasing,
+1: increasing / montonically increasing / non-decreasing,
0: constant or unsorted
-1: decreasing / monotonically decreasing / non-increasing,
-2: strictly decreasing, or
ordering tests, e.g. is_increasing are more efficient at testing for specific cases.
monotonicity()
is an alias for ordering
.
integer;
2 : stictly increasing
1 : increasing / montonically increasing / non-decreasing
0 : non-ordered or constant
-1: decreasing / monotonically decreasing / non-increasing
-2: strictly decreasing
NA
:contains only
NAs all
na.rmdid not resolve all
NA's
http://en.wikipedia.org/wiki/Monotonic_function http://stackoverflow.com/questions/13093912/how-to-check-if-a-sequence-of-numbers-is-monotonically-increasing-or-decreasing
base::is.unsorted
1 2 3 4 5 6 7 8 9 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.