Learn R Programming

BBmisc (version 1.13)

rangeVal: Calculate range statistic.

Description

A simple wrapper for diff(range(x)), so max(x) - min(x).

Usage

rangeVal(x, na.rm = FALSE)

Value

[numeric(1)].

Arguments

x

[numeric]
The vector.

na.rm

[logical(1)]
If FALSE, NA is returned if an NA is encountered in x. If TRUE, NAs are disregarded. Default is FALSE