maxFunc: Compute Maximum and Minimum Functions

View source: R/statistics.R

maxFuncR Documentation

Compute Maximum and Minimum Functions

Description

Compute Maximum and Minimum Functions

Usage

maxFunc(..., na.rm = FALSE, bound = NULL, Funcs = c(...))

minFunc(..., na.rm = FALSE, bound = NULL, Funcs = c(...))

Arguments

...

arbitrary list of vectorized functions or vectorized functions, behaving returning numerical values of the same size as a result to the same arguments

na.rm

boolean, should na results be discared?

bound

a limiting function. All values exceeding (or smaller than for minFunc) are ignored in the maximum.

Funcs

the list of all functions that should be used in the maximum or minimum

Value

a function taking like the given functions, and returning the maximum (or minium) of the values not exceeding the boundary.

Functions

  • minFunc(): computes the minimum

Examples

F = maxFunc(\(x) dnorm(x),\(x) dnorm(x,mean=2),bound=\(x) rep(0.3,length(x)))
x=seq(-2,5,by=0.01)
plot(x,F(x))
F = minFunc(\(x) dnorm(x),\(x) dnorm(x,mean=2),bound=\(x) rep(0.1,length(x)))
plot(x,F(x))

DistributionalDDA documentation built on Oct. 20, 2026, 5:06 p.m.