hutilscpp (version 0.1.0)

pminC: Parallel minimum

Description

Parallel minimum

Usage

pmin0(x, in_place = FALSE)

pminV(x, y, in_place = FALSE)

pminC(x, a = 0, in_place = FALSE)

pmin3(x, y, z, in_place = FALSE)

Arguments

x

A numeric vector.

in_place

(logical, default: FALSE) Should x be modified in-place.

y, z

Other numeric vectors.

a

A single number.

Value

Same as pmin(x, 0).

pmin0(x) = pmin(x, 0)

pminV(x, y) = pmin(x, y)

pminC(x, a) = pmin(x, a) for length-one a.

pmin3(x, y, z) = pmin(x, pmin(y, z)).

Details

The type of x is preserved as far as possible.

Examples

Run this code
# NOT RUN {
pminV(10:1, 1:10)
pmin0(-5:5)
seq_out <- function(x, y) seq(x, y, length.out = 10)
pmin3(seq_out(0, 10), seq_out(-5, 50), seq_out(20, -10))

# }

Run the code above in your browser using DataLab