We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Would you consider implementing rolling versions of min() and max()
min()
max()
The text was updated successfully, but these errors were encountered:
Thanks, I would also like to include in future versions (see #4).
Sorry, something went wrong.
I have added both roll_min and roll_max in the development version. Here's an example:
roll_min
roll_max
# devtools::install_github("jjf234/roll") library(roll) library(testthat) n_vars <- 30 n_obs <- 1500 x <- matrix(rnorm(n_obs * n_vars), nrow = n_obs, ncol = n_vars) # rolling minimums ('min_obs = 1' equivalent to 'partial = TRUE') expect_equivalent(roll_min(x, 5, min_obs = 1), rollapplyr(x, 5, min, partial = TRUE)) # rolling maximums expect_equivalent(roll_max(x, 5, min_obs = 1), rollapplyr(x, 5, max, partial = TRUE))
Awesome, thanks!
No branches or pull requests
Would you consider implementing rolling versions of
min()
andmax()
The text was updated successfully, but these errors were encountered: