Description Usage Arguments Value Examples
Indicates if a sequence of values are (non strictly) montonic increasing, decreasing or either.
1 | isMonotonic(v_n_values, s_direction = "either")
|
v_n_values |
numeric vector. Length of |
s_direction |
a string of the monotonic direction we are interested. Must be 'decreasing' 'increasing' or 'either'. |
a boolean (logic vector length one) indicating if the sequence of values is monotonic. If v_n_values has a NA
value the result is NA
.
1 2 3 4 5 | isMonotonic(c(1,1,2,3))
isMonotonic(c(1,1,NA, 2,3))
isMonotonic(1:5, s_direction = "increasing")
isMonotonic(1:5, s_direction = "decreasing")
isMonotonic(5:1, s_direction = "decreasing")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.