max with NA handling

max_na(...)

Arguments

...

numeric or character vector

Value

maximum or NA if all values are NA

Examples

max_na(2, 3, NA)
#> [1] 3
max_na(NA, NA)
#> [1] NA