powered by
findMax is a function that takes a subset of a vector and returns the index of the maximum value in that subset.
findMax
findMax(subIndxs, srs)
The index of the maximum value in the subset.
A numeric vector representing the subset of indices to consider.
A vector of numerical data
srs <- c(10, 20, 30, 40, 50) findMax(c(1, 3, 5),srs) #result is 5.
Run the code above in your browser using DataLab