Learn R Programming

CVXR (version 1.9.1)

ptp: Peak-to-peak (range): max(x) - min(x)

Description

Computes the range of values along an axis: max(x) - min(x). The result is always nonnegative.

Usage

ptp(x, axis = NULL, keepdims = FALSE)

Value

An Expression representing max(x) - min(x).

Arguments

x

An Expression or numeric value.

axis

NULL (all), 0 (columns), or 1 (rows).

keepdims

Logical; keep reduced dimension?