Commit 3dae8928 authored by Holger Brandl's avatar Holger Brandl

added round_any

parent 6912dbf8
......@@ -545,6 +545,9 @@ trim_outliers <- function(values, probs=c(0.05, 0.95)){
se <- function(x) sd(x, na.rm = TRUE) / sqrt(sum(! is.na(x)))
# https://stackoverflow.com/questions/43627679/round-any-equivalent-for-dplyr/46489816#46489816
round_any = function(x, accuracy, f=round){f(x/ accuracy) * accuracy}
########################################################################################################################
### Misc
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment