safe_median()
works stats::median()
but warns if some elements of ...
are never used.
safe_median(x, ...) # S3 method for numeric safe_median(x, ..., na.rm = TRUE)
x | Numeric vector |
---|---|
... | Additional arguments passed on to methods. |
na.rm | For numeric method, should missing values be removed? |
#> [1] 5.5#> [1] 5.5#> [1] NA#> Error : 1 components of `...` were not used. #> #> We detected these problematic arguments: #> * `na.mr` #> #> Did you misspecify an argument?#> [1] 1#> Error : 2 components of `...` were not used. #> #> We detected these problematic arguments: #> * `..1` #> * `..2` #> #> Did you misspecify an argument?