If TRUE, the vector is plotted and peaks are indicated with red triangles.
Value
A vector indicating the location (position in the vector) of peaks in the vector.
Details
This function looks for peaks by finding elements whose value is greater than both the elements that surround it. If no peaks are found, a value of zero is returned.