Learn R Programming

extras (version 0.7.3)

fabs: Absolute

Description

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

Usage

fabs(x)

Value

A numeric vector of the corresponding absolute values.

Arguments

x

An existing R object.

Details

A wrapper on abs().

See Also

Other translations: exp10(), exp2(), ilog(), ilog10(), ilog2(), ilogit(), inv_logit(), invlogit(), log10<-(), log2<-(), log<-(), logit(), logit<-(), phi(), pow(), step()

Examples

Run this code
fabs(c(0, -1, 2))

Run the code above in your browser using DataLab