threshold_peaks: threshold_peaks

Description Usage Arguments

View source: R/threshold_peaks.R

Description

Function to detect if two peaks in a density spectrum can be considered separate based on a user supplied threshold. Creates a sequence of divisions from the troughs immediately preceding any significant peaks, then bins occurrences for a given taxon name by those divisions.

Usage

1
2
3
4
5
6
7
threshold_peaks(
  x,
  y,
  ycols = c("genus", "max_ma", "min_ma"),
  thresh = 15,
  verbose = TRUE
)

Arguments

x

A list of significant peaks as returned by find_peaks

y

An occurrence dataset with taxon names corresponding to the list names of x

ycols

A character vector denoting, in order, the taxon, FAD and LAD columns in y

thresh

The threshold distance between peaks above which they will be considered distinct - given in Ma

verbose

A logical determining if function progress should be reported


jf15558/FAU.JFS documentation built on Jan. 21, 2022, 6:52 a.m.