pmin function

Maxima and Minima for mcnodes

Maxima and Minima for mcnodes

Returns the parallel maxima and minima of the input values.

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

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))

Arguments

  • ...: One or more mcnodes s or one or more mcnode s 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.

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.

Returns

an mcnode of adequate type and dimension.

See Also

min, Ops.mcnode

  • Maintainer: Regis Pouillot
  • License: GPL (>= 2)
  • Last published: 2024-06-05

Useful links