peakfind: Find the Peaks

Description Usage Arguments Details Value Author(s) Examples

Description

Locate the peaks in a numeric vector.

Usage

1

Arguments

x

A vector whose peaks are to be located.

show

If TRUE, the vector is plotted and peaks are indicated with red triangles.

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.

Value

A vector indicating the location (position in the vector) of peaks in the vector.

Author(s)

Santiago Barreda <sbarreda@ucdavis.edu>

Examples

1
2
3
4
data (sound)
sound2 = sound$sound[10000:11000] 
spectrum = spectralslice (sound2, padding = 0, output = TRUE, show = TRUE)
peakfind (spectrum[,2])


Search within the phonTools package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.