Learn R Programming

broman (version 0.84)

maxabs: maximum of absolute value

Description

Take the maximum of the absolute values of the input

Usage

maxabs(x, na.rm = FALSE)

Value

The maximum of the absolute value of the input

Arguments

x

a numeric vector or array

na.rm

a logical indicating whether missing values should be removed.

Examples

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

Run the code above in your browser using DataLab