Pmax: Minima and maxima of two vectors/matrices and Column-row wise...

View source: R/Pmin.R

Minima and maxima of two vectors/matrices and Column-row wise minima and maxima of two matricesR Documentation

Minima and maxima of two vectors/matrices and Column-row wise minima and maxima of two matrices

Description

Minima and maxima of two vectors/matrices and Column-row wise minima and maxima of two matrices.

Usage

colPmax(x, y)
colPmin(x, y)
Pmax(x, y,na.rm = FALSE)
Pmin(x, y,na.rm = FALSE)
Pmin_Pmax(x, y,na.rm = FALSE)

Arguments

x

A numerical vector or matrix with numbers.

y

A numerical vector with numbers.

na.rm

TRUE or FAlSE for remove NAs if exists.

Details

The parallel minima or maxima are returned. This are the same as the base functions pmax and pmin.

Value

A numerical vector/matrix with numbers, whose length is equal to the length of the initital matrices containing the maximum or minimum between each pair.

Author(s)

Manos Papadakis

R implementation and documentation: Manos Papadakis <papadakm95@gmail.com>.

See Also

Sort, colMins, colMaxs, colMedians

Examples

x <- matrix(rnorm(100),10,10)
y <- matrix(rnorm(100),10,10)
res<-colPmax(x, y)
res<-colPmin(x, y)
x<-y<-NULL

Rfast documentation built on Nov. 9, 2023, 5:06 p.m.