Skip to contents

Computes the absolute value of x. Used in TMB as replacement for abs() which is seemingly ambiguous.

Usage

fabs(x)

Arguments

x

An existing R object.

Value

A numeric vector of the corresponding absolute values.

Details

A wrapper on abs().

Examples

fabs(c(0, -1, 2))
#> [1] 0 1 2