Learn R Programming

rje (version 1.10.16)

rowMins: Row-wise minima and maxima

Description

Row-wise minima and maxima

Usage

rowMins(x)
rowMaxs(x)

Arguments

x

a numeric (or logical) matrix or data frame

Value

numeric vector of length nrow(x) giving the row-wise minima (or maxima) of x.

Details

The function coerces x to be a data frame and then uses pmin (pmax) on it. This is the same as apply(x, 1, min) but generally faster if the number of rows is large.