Learn R Programming

CropDetectR (version 0.0.1)

localMaxima: Finds local maxima of a vector

Description

Takes in a vector and finds the local maximas. (Credit user Tommy https://stackoverflow.com/questions/6836409/finding-local-maxima-and-minima).

Usage

localMaxima(x)

Arguments

x

A 1D array or vector

Value

A list of local maximas in the vector

Examples

Run this code
# NOT RUN {
maximas <- localMaxima(x)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab