get_mon: Determine Monotony of Vector.

View source: R/utils.R

get_monR Documentation

Determine Monotony of Vector.

Description

Determine Monotony of Vector.

Usage

get_mon(x)

Arguments

x

(numeric) vector

Value

1 if monotonically increasing, -1 if monotonically decreasing, otherwise, a vector of 1 or -1 indicating increasing or decreasing status

Author(s)

Andre Schuetzenmeister andre.schuetzenmeister@roche.com

Examples

x1 <- seq(-1, 1, .1)
x2 <- seq(1, -1, -.1)
y <- x1^2 / 2 + x1/3 - 5
get_mon(x1)
get_mon(x2)
get_mon(y)

VFP documentation built on April 13, 2025, 5:12 p.m.