min_run | R Documentation |
min_run
calculates running min on given x
numeric vector, specified k
window size.
min_run(
x,
k = integer(0),
lag = integer(1),
idx = integer(0),
at = integer(0),
na_rm = TRUE,
na_pad = FALSE
)
x |
( |
k |
( |
lag |
( |
idx |
( |
at |
( |
na_rm |
|
na_pad |
( |
min (numeric
) vector of length equals length of x
.
set.seed(11)
x1 <- sample(c(1, 2, 3), 15, replace = TRUE)
x2 <- sample(c(NA, 1, 2, 3), 15, replace = TRUE)
k <- sample(1:4, 15, replace = TRUE)
min_run(x1)
min_run(x2, na_rm = TRUE)
min_run(x2, na_rm = TRUE, k = 4)
min_run(x2, na_rm = FALSE, k = k)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.