Compute the Parallel Minima and Maxima between Vectors in R Programming - pmin() and pmax() Functions Last Updated : 23 Jun, 2020 Comments Improve Suggest changes Like Article Like Report 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: Python3 1== # R program to illustrate # pmin() function # First example vector x1 <- c(2, 9, 5, 7, 1, 8) # Second example vector x2 <- c(0, 7, 2, 3, 9, 6) # Application of pmin() in R 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 : Python3 1== # R program to illustrate # pmax() function # First example vector x1 <- c(2, 9, 5, 7, 1, 8) # Second example vector x2 <- c(0, 7, 2, 3, 9, 6) # Application of pmax() in R pmax(x1, x2) Output: [1] 2 9 5 7 9 8 Comment More infoAdvertise with us Next Article Compute the Parallel Minima and Maxima between Vectors in R Programming - pmin() and pmax() Functions A akhilsharma870 Follow Improve Article Tags : R Language R Vector-Function Similar Reads Get the Minimum and Maximum element of a Vector in R Programming - range() Function range() function in R Programming Language is used to get the minimum and maximum values of the vector passed to it as an argument. Syntax: range(x, na.rm, finite) Parameters:Â x: Numeric Vectorna.rm: Boolean value to remove NAfinite: Boolean value to exclude non-finite elementsR - range() Function 1 min read Calculate the Cumulative Minima of a Vector in R Programming - cummin() Function cummin() function in R Language is used to calculate the cumulative minima of the values of vector passed as arguments. Syntax: cummin(x) Parameters: x: numeric object Example 1: Python3 1== # R program to cumulative minima # Calling cummin() function cummin(2:6) cummin(-2:-6) cummin(1.8:4.2) Output 1 min read Calculate the Cumulative Maxima of a Vector in R Programming - cummax() Function The cumulative maxima is the max value of elements 1 through l for an element l of the given variables. cummax() function in R Language is used to calculate the cumulative maxima of the values of vector passed as arguments. Syntax: cummax(x)Â Parameters:Â x: numeric object Example 1:Â Python3 # R pr 2 min read Get the Minimum element of an Object in R Programming - min() Function min() function in R Language is used to find the minimum element present in an object. This object can be a Vector, a list, a matrix, a data frame, etc.. Syntax: min(object, na.rm) Parameters: object: Vector, matrix, list, data frame, etc. na.rm: Boolean value to remove NA element. Example 1: Python 1 min read Get the Maximum element of an Object in R Programming - max() Function max() function in R Language is used to find the maximum element present in an object. This object can be a Vector, a list, a matrix, a data frame, etc.. Syntax: max(object, na.rm) Parameters: object: Vector, matrix, list, data frame, etc. na.rm: Boolean value to remove NA element. Example 1: Python 1 min read Like