betterMax: Find the maximum value of a object that may contain NA's.

Description Usage Arguments Value Examples

View source: R/betterMax.R

Description

Find the maximum value of a object that may contain NA's.

Usage

1

Arguments

x

An object such as a numeric vector, matrix, or data.frame

Value

The largest value in x, if any. Otherwise, NA.

Examples

1
2
3
4
5
betterMax(1:5)
betterMax(c(2,3,NA,7))
betterMax(c(NA, NA, NA))
ex1 = data.frame(X1 = LETTERS, X2 = 1:26, X3 = sample(c(20,NA), 26, T))
betterMax(ex1)

debarros/dbTools documentation built on Sept. 27, 2018, 12:16 p.m.