tests/testthat/helper-round_dbl.R

round_dbl <- function(data, digits = 4L) {
  data[detect_dbl(data)] <- lapply(data[detect_dbl(data)], round, digits = digits)
  data
}

detect_dbl <- function(data) {
  unlist(lapply(data, is.double))
}
2DegreesInvesting/r2dii.match documentation built on Sept. 12, 2022, 11:15 p.m.