find_peaks: Show timeseries peak values above a threshold

Description Usage Arguments Value Examples

View source: R/FindPeaks.R

Description

This function plots the peak values above the entered threshold argument.

Usage

1
find_peaks(data, index = NULL, values, threshold = 0, ...)

Arguments

data

a dataframe containing the measurements and optional index variables

index

column reference entered as an object variable to the indices. Indices are plotted on the x axis. Observations can be either a date or numeric format.

values

column reference entered as an object variable to the values against which the peak values are calculated. Observations ust be numeric format

threshold

a numeric value above which to calculate peaks.

...

other arguments to pass to the plot function.

Value

A plot of the peaks at the specified threshold and Peak value data that can be assigned to an object

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
data(waves)
find_peaks(data = waves,
           index = "date_time",
           values = "height_meters",
           threshold = 1.3)

# To show data without a date/time index
find_peaks(data = waves,
           values = "height_meters",
           threshold = 1.3)

towananalytics/tatools documentation built on Jan. 24, 2022, 7:31 p.m.