Learn R Programming

matlab2r (version 1.5.0)

max: Maximum (MATLAB version)

Description

Finds the minimum value for each column of a matrix, potentially returning the indices instead

Usage

max(X, indices = TRUE)

Value

Either a list or a vector

Arguments

X

matrix

indices

return indices?

Author

Waldir Leoncio

Examples

Run this code
A <- matrix(c(23, 42, 37, 15, 52))
max(A)
base::max(A) # for comparison

Run the code above in your browser using DataLab