pmin()
function in R Language is used to return the parallel minima of the input vectors.
Syntax: pmin(x1, x2)
Parameters:
x1: vector one
x2: vector two
Example 1:
x1 < - c( 2 , 9 , 5 , 7 , 1 , 8 )
x2 < - c( 0 , 7 , 2 , 3 , 9 , 6 )
pmin(x1, x2)
|
Output:
[1] 0 7 2 3 1 6
pmax() Function
pmax()
function returns the parallel maxima of two or more input vectors.
Syntax: pmax(x1, x2)
Parameters:
x1: vector one
x2: vector two
Example :
x1 < - c( 2 , 9 , 5 , 7 , 1 , 8 )
x2 < - c( 0 , 7 , 2 , 3 , 9 , 6 )
pmax(x1, x2)
|
Output:
[1] 2 9 5 7 9 8