maxabs: maximum of absolute value

View source: R/maxabs.R

maxabsR Documentation

maximum of absolute value

Description

Take the maximum of the absolute values of the input

Usage

maxabs(x, na.rm = FALSE)

Arguments

x

a numeric vector or array

na.rm

a logical indicating whether missing values should be removed.

Value

The maximum of the absolute value of the input

Examples

x <- c(5, -2, 8, -20, 2.3)
maxabs(x)

broman documentation built on July 8, 2022, 5:07 p.m.

Related to maxabs in broman...