Running examples in ‘brolgar-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: keys_near.data.frame
> ### Title: Return keys nearest to a given statistics or summary.
> ### Aliases: keys_near.data.frame
> 
> ### ** Examples
> 
> heights %>%
+   key_slope(height_cm ~ year) %>%
+   keys_near(key = country,
+             var = .slope_year)
# A tibble: 5 × 5
  country    .slope_year stat  stat_value stat_diff
  <chr>            <dbl> <fct>      <dbl>     <dbl>
1 Austria         0.0695 q_75      0.0690  0.000515
2 Burundi         0.321  max       0.321   0       
3 Eritrea        -0.102  min      -0.102   0       
4 Mali            0.0401 med       0.0403  0.000120
5 Tajikistan      0.0199 q_25      0.0205  0.000632
> # Specify your own list of summaries
> l_ranges <- list(min = b_min,
+                  range_diff = b_range_diff,
+                  max = b_max,
+                  iqr = b_iqr)
> 
> heights %>%
+   key_slope(formula = height_cm ~ year) %>%
+   keys_near(key = country,
+               var = .slope_year,
+               funs = l_ranges)
Error in `mutate()`:
ℹ In argument: `range_diff = (function (x, ...) ...`.
Caused by error in `b_range()`:
! formal argument "na.rm" matched by multiple actual arguments
Backtrace:
     ▆
  1. ├─heights %>% key_slope(formula = height_cm ~ year) %>% ...
  2. ├─brolgar::keys_near(., key = country, var = .slope_year, funs = l_ranges)
  3. ├─brolgar:::keys_near.data.frame(...)
  4. │ └─... %>% ...
  5. ├─dplyr::mutate(., stat = factor(x = stat, levels = names(funs)))
  6. ├─dplyr::ungroup(.)
  7. ├─dplyr::top_n(., -top_n, wt = stat_diff)
  8. │ └─dplyr::filter(...)
  9. ├─dplyr::group_by(., stat)
 10. ├─dplyr::mutate(...)
 11. ├─tidyr::pivot_longer(...)
 12. ├─dplyr::select(...)
 13. ├─dplyr::mutate_at(...)
 14. │ ├─dplyr::mutate(.tbl, !!!funs)
 15. │ └─dplyr:::mutate.data.frame(.tbl, !!!funs)
 16. │   └─dplyr:::mutate_cols(.data, dplyr_quosures(...), by)
 17. │     ├─base::withCallingHandlers(...)
 18. │     └─dplyr:::mutate_col(dots[[i]], data, mask, new_columns)
 19. │       └─mask$eval_all_mutate(quo)
 20. │         └─dplyr (local) eval()
 21. ├─brolgar (local) `<fn>`(.slope_year)
 22. │ ├─base::diff(b_range(x, na.rm = TRUE, ...))
 23. │ └─brolgar::b_range(x, na.rm = TRUE, ...)
 24. └─base::.handleSimpleError(...)
 25.   └─dplyr (local) h(simpleError(msg, call))
 26.     └─rlang::abort(message, class = error_class, parent = parent, call = error_call)
Execution halted