Learn R Programming

broman (version 0.72-4)

maxabs: 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

Run this code
# NOT RUN {
x <- c(5, -2, 8, -20, 2.3)
maxabs(x)
# }

Run the code above in your browser using DataLab