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 May 29, 2024, 7:18 a.m.

Related to maxabs in broman...