extremum: Maximum and minimum values

Description Usage Arguments Value Examples

Description

rray_maximum() and rray_minimum() compute the elementwise max / min between x and y.

Usage

1
2
3

Arguments

x, y

A vector, matrix, array or rray.

Value

The elementwise max/min of x and y, with broadcasting.

Examples

1
2
3
4
5
6
7
8
9
# Elementwise maximum
rray_maximum(c(1, 2, 3), c(3, 2, 1))

# Elementwise minimum
rray_minimum(c(1, 2, 3), c(3, 2, 1))

# With broadcasting
x <- matrix(1:3)
rray_maximum(x, t(x))

rray documentation built on July 23, 2019, 5:04 p.m.