cummax() function in R Language is used to calculate the cumulative maxima of the values of vector passed as arguments.
x: numeric object
 6 6 6 6 6  -2 -2 -2 -2 -2  3.8 3.8 3.8
 5 5 5 6 6 6  -4 6 6
Since, the maxima is calculated for the values in decreasing order and hence the above code shows two cumulative values for vectors.
- Get Exclusive Elements between Two Objects in R Programming - setdiff() Function
- Intersection of Two Objects in R Programming - intersect() Function
- Add Leading Zeros to the Elements of a Vector in R Programming - Using paste0() and sprintf() Function
- Print the Value of an Object in R Programming - identity() Function
- Check if Two Objects are Equal in R Programming - setequal() Function
- Check for Presence of Common Elements between Objects in R Programming - is.element() Function
- Check if Elements of a Vector are non-empty Strings in R Programming - nzchar() Function
- Make Elements of a Vector Unique in R Programming - make.unique() Function
- Getting and Setting Length of the Vectors in R Programming - length() Function
- Return True Indices of a Logical Object in R Programming - which() Function
- Seeking a unique match of elements in R Programming - char.expand() Function
- Getting Match of an Element within a Vector in R Programming - charmatch() Function
- Replace the Elements of a Vector in R Programming - replace() Function
- Extracting Substrings from a Character Vector in R Programming - substring() Function
- Convert elements of a Vector to Strings in R Language - toString() Function
- Combine Vectors, Matrix or Data Frames by Columns in R Language - cbind() Function
- Calculate Cumulative Product of a Numeric Object in R Programming – cumprod() Function
- Creating a Vector of sequenced elements in R Programming - seq() Function
- Convert a Vector into Factor in R Programming - as.factor() Function
- Get the number of rows of an Object in R Programming - nrow() Function
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.