pmax: Parallel Maxima and Minima

Description Usage Arguments Details Value Methods See Also Examples

Description

Returns the parallel maxima and minima of the input values.

The functions pmin and pmax have been made S4 generics, and this page documents the “... method for class "mNumber"”, i.e., for arguments that are numeric or from class "mpfr".

Usage

1
2
pmax(..., na.rm = FALSE)
pmin(..., na.rm = FALSE)

Arguments

...

numeric or arbitrary precision numbers (class mpfr).

na.rm

a logical indicating whether missing values should be removed.

Details

See pmax, the documentation of the base functions, i.e., default methods.

Value

vector-like, of length the longest of the input vectors; typically of class mpfr, for the methods here.

Methods

... = "ANY"

the default method, really just base::pmin or base::pmax, respectively.

... = "mNumber"

the method for mpfr arguments, mixed with numbers; designed to follow the same semantic as the default method.

See Also

The documentation of the base functions, pmin and pmax; also min and max; further,

range (both min and max).

Examples

1
2
 (pm <- pmin(1.35, mpfr(0:10, 77)))
 stopifnot(pm == pmin(1.35, 0:10))

Example output

Loading required package: gmp

Attaching package: 'gmp'

The following objects are masked from 'package:base':

    %*%, apply, crossprod, matrix, tcrossprod

C code of R package 'Rmpfr': GMP using 64 bits per limb


Attaching package: 'Rmpfr'

The following objects are masked from 'package:stats':

    dbinom, dnorm, dpois, pnorm

The following objects are masked from 'package:base':

    cbind, pmax, pmin, rbind

11 'mpfr' numbers of precision  77   bits 
 [1]                          0                          1
 [3] 1.350000000000000088817842 1.350000000000000088817842
 [5] 1.350000000000000088817842 1.350000000000000088817842
 [7] 1.350000000000000088817842 1.350000000000000088817842
 [9] 1.350000000000000088817842 1.350000000000000088817842
[11] 1.350000000000000088817842

Rmpfr documentation built on Aug. 19, 2018, 3 a.m.