max.col() function in R Language check for maximum value in each row and returns the column no. for it.
Syntax: max.col(x, ties.method)
x: Numeric matrix
ties.method: It takes random, first, and last as value and returns the position accordingly in case of a tie.
 2 2  1 2  3 3 3
[, 1] [, 2] [1, ] 2 2 [2, ] 3 4  2 2  1 2  2 2
- Calculate the Mean of each Row of an Object in R Programming – rowMeans() Function
- Getting a Matrix of number of rows in R Programming - row() Function
- Get the Maximum element of an Object in R Programming - max() Function
- Get the Minimum and Maximum element of a Vector in R Programming - range() Function
- Calculate the Mean of each Column of a Matrix or Array in R Programming - colMeans() Function
- Get or Set Dimensions of a Matrix in R Programming - dim() Function
- Get Transpose of a Matrix or Data Frame in R Programming - t() Function
- Get the Minimum element of an Object in R Programming - min() Function
- Find position of a Matched Pattern in a String in R Programming – grep() Function
- Extract word from a String at specified position in R Programming - word() Function
- Check if the Object is a Matrix in R Programming - is.matrix() Function
- Convert a Data Frame into a Numeric Matrix in R Programming - data.matrix() Function
- Convert an Object into a Matrix in R Programming - as.matrix() Function
- Changing row and column values of a Matrix in R Language - sweep() function
- Get the List of Arguments of a Function in R Programming - args() Function
- Transform the Scaled Matrix to its Original Form in R Programming - Using Matrix Computations
- Get Exclusive Elements between Two Objects in R Programming - setdiff() Function
- Get or Set Levels of a Factor in R Programming - levels() Function
- Get Indices of Specified Values of an Array in R Programming - arrayInd() Function
- Get the number of columns of an Object in R Programming - ncol() 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 firstname.lastname@example.org. 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.