pos: Positive Part

View source: R/basic_fcn_RD.R

posR Documentation

Positive Part

Description

Calculates component-wise max(X,0) for a matrix X.

Usage

pos(X)

Arguments

X

A data matrix.

Value

A matrix in the same dimension of X, after max(x,0) was applied to each component x of X.

Examples

X <- matrix(c(1, -2, -3, 4, 5, -6), nrow = 3, ncol = 2)
pos(X)

koohyun-kwon/rdadapt documentation built on May 8, 2022, 8:49 p.m.