pmin.mcnode: Parallel Maxima and Minima for mcnodes

View source: R/pmin.R

pmin.mcnodeR Documentation

Parallel Maxima and Minima for mcnodes

Description

Returns the parallel maxima and minima of the input values, extended to ‘⁠mcnode⁠’ objects. The same rules as in Ops.mcnode are applied for type determination.

Usage

pmin(..., na.rm = FALSE)

pmax(..., na.rm = FALSE)

## Default S3 method:
pmin(..., na.rm = FALSE)

## Default S3 method:
pmax(..., na.rm = FALSE)

## S3 method for class 'mcnode'
pmin(..., na.rm = FALSE)

## S3 method for class 'mcnode'
pmax(..., na.rm = FALSE)

Arguments

...

one or more ‘⁠mcnode⁠’s or ‘⁠mcnode⁠’s and compatible vectors. The first element must be an ‘⁠mcnode⁠’.

na.rm

a logical indicating whether missing values should be removed.

Details

‘⁠pmax⁠’ and ‘⁠pmin⁠’ take one or more ‘⁠mcnode⁠’ and/or vectors as arguments and return a ‘⁠mcnode⁠’ of adequate type and size giving the "parallel" maxima or minima. Note that the first element of ‘⁠...⁠’ should be an ‘⁠mcnode⁠’.

Value

an ‘⁠mcnode⁠’ of adequate type and dimension.

See Also

min, Ops.mcnode

Examples

ndvar(10)
ndunc(21)
x <- mcstoc(rnorm, "V")
pmin(x, 0)
y <- mcdata(rep(c(-1, 1), length=ndunc()), "U")
unclass(pmin(x, y))

mc2d documentation built on Oct. 23, 2026, 1:06 a.m.