powered by
Takes in a vector and finds the local maximas. (Credit user Tommy https://stackoverflow.com/questions/6836409/finding-local-maxima-and-minima).
localMaxima(x)
A 1D array or vector
A list of local maximas in the vector
# NOT RUN { maximas <- localMaxima(x) # } # NOT RUN { # }
Run the code above in your browser using DataLab