Skip to contents

An alternative to max that preserves names

Usage

max2(x)

Arguments

x

vec

Value

atomic returns the largest element in the vector

See also

Other statistics: smode()

Examples

max2(c(a = 1, b = 2))
#> b 
#> 2