Description Usage Arguments Value
View source: R/threshold_ranges.R
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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
x |
An occurrence dataset containing taxon names, maximum ages and minimum ages |
rank |
The column name in x containing the taxon names |
srt |
A column name in x denoting the occurrence maximum ages |
end |
A column name in x denoting the occurrence minumum ages |
method |
The method for quantifying occurrence density: one histogram or kernel. Kernel is the recommended default. As called be @seealso densify |
step |
A positive integer specifying the time window size for density calculation. As called by @seealso densify |
density |
A positive numeric specifying the step size for densifying records. This should ideally be smaller than step. As called by @seealso densify |
use_sd |
A logical determining whether to use peaks detected as significant using the mean + standard deviation of its neighbourhood. If FALSE, then the peaks need only be greater than the neighbourhood mean to be significant. Thus, use_sd is more conservative, but less prone to noise. As called by @seealso find_peaks |
win |
A positive integer specifying the neighborhood window length on either side of a peak durign significance testing (i.e. win 5 will give a total window of 11: -5 indices + peak index + 5 indices). As called by @seealso find_peaks |
thresh |
The threshold distance between peaks above which they will be considered distinct - given in Ma |
... |
additional arguments passed to @seealso density |
report |
A logical determining if the analytical outputs of the function be returned to the user, as well as the revised taxon names, TRUE by default |
verbose |
A logical determining if function progress should be reported |
If report = TRUE (the default), a list of five elements. $data gives the thresholded (and potentially subdivided) taxon names. $matrix is the taxon-wise matrix of occurrence densities. $peaks is a list containing three lists of peaks (all peaks, significant by mean + sd, significant by sd only) for each taxon and a dataframe of peak counts between the three treatments. $comparison
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.