monotonicity: monotonicity

Description Usage Arguments Value

Description

Determine the monotonicity of a numeric vector as: stictly increasing, increasing / montonically increasing / non-decreasing, decreasing / monotonically decreasing / non-increasing, strictly decreasing, or constant

Usage

1
2
3
4
5
6
7

Arguments

x

numeric vector

na.action

function to handle NA values (default:na.omit)

...

additional arguments passed to na.action

monotonicty determines the monotonicy of a numeric vector. Instead of using diff, this function uses cummax and cummin functions for efficiency. See the stackoverflow reference for timings and an explanation.

Value

integer; 2


decisionpatterns/monotone documentation built on May 15, 2019, 1:56 a.m.