is_continuous | R Documentation |
Check if a vector represents a continuous sequence of integer values between the minumum and the maximum, sorted in ascending or descending order.
is_continuous(x, direction = c("both", "forward", "backward"), na.rm = TRUE)
x |
Numeric vector. |
direction |
Character value indicating if check the values in ascending order ( |
na.rm |
Logical value specifying if remove missing data before run the procedure. |
Pay attantion that the monotonicity is required. In this sense, is_continuous
is stronger
than is_monotonic
.
is_monotonic
x <- c(1, 2, 3, 5)
is_continuous(x)
is_monotonic(x)
x <- c(4, 3, 2, 1)
is_continuous(x)
is_monotonic(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.