is_monotonic | R Documentation |
Check if the values in a vector are a monotonic sequence.
is_monotonic(x, direction = c("both","forward","backward"),
decreasing = NULL, na.rm = TRUE)
x |
Numeric vector. |
direction |
Character value indicating if check the monotonic trend only for a particular direction. |
decreasing |
Deprecated. Use |
na.rm |
Logical value specifying if remove missing data before run the procedure. |
da descrivere
isoreg
, is_continuous
x1 <- c(1.3, 2.2, 3.8, 3.3, 5.6, 6.1, 8.0, 8.0, 8.9, 9.9)
is_monotonic(x1)
x2 <- x1
# Smoothing of x1
x2[3:4] <- mean(x2[3:4])
is_monotonic(x2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.