ellipsis (version 0.0.1)

safe_median: Safe version of median

Description

safe_median() works stats::median() but warns if some elements of ... are never used.

Usage

safe_median(x, ...)

# S3 method for numeric safe_median(x, ..., na.rm = TRUE)

Arguments

x

Numeric vector

...

Additional arguments passed on to methods.

na.rm

For numeric method, should missing values be removed?

Examples

Run this code
# NOT RUN {
x <- c(1:10, NA)
safe_median(x, na.mr = TRUE)
safe_median(x, na.rm = TRUE)
# }

Run the code above in your browser using DataCamp Workspace