runmax | R Documentation |
Running n-value maximum and data frame with variable swapped for running maximum
runmax(y, n) dfrunmax(data, cons, ynm, n = 2)
y |
a vector |
n |
an integer giving the number of observations to calculate running maxmimum over; defaults to 2 |
data |
a data frame |
cons |
a character string for the variable in |
ynm |
a character string for the variable in |
runmax
returns a vector of the same dimension as y
dfrunmax
returns a data frame with observations swapped for n-observation running maximum
runmax(runif(10), 5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.