mc2d (version 0.1-17)

pmin: Maxima and Minima for mcnodes

Description

Returns the parallel maxima and minima of the input values.

Usage

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

Arguments

...
One or more mcnodess or one or more mcnodes and vector(s) of compatible size. Note that one mcnode must be at the first place.
na.rm
a logical indicating whether missing values should be removed.

Value

an mcnode of adequate type and dimension.

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) of the mcnode and/or vectors. Note that the first element of ... should be an mcnode. The resulting type of mcnode is variable according to the elements that are passed. The same rules as in Ops.mcnode are applied.

See Also

min, Ops.mcnode

Examples

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





Run the code above in your browser using DataLab