powered by
Running \(n\)-value maximum and data frame with variable swapped for running maximum
runmax(y, n)dfrunmax(data, cons, ynm, n = 2)
dfrunmax(data, cons, ynm, n = 2)
a vector
an integer giving the number of observations to calculate running maxmimum over; defaults to 2
a data frame
a character string for the variable in data that identifies consecutive observations
data
a character string for the variable in data that is the observations
runmax returns a vector of the same dimension as y
runmax
y
dfrunmax returns a data frame with observations swapped for \(n\)-observation running maximum
dfrunmax
# NOT RUN { runmax(runif(10), 5) # }
Run the code above in your browser using DataLab