Description Usage Arguments Details Value Author(s) Examples
This is a simple algorithm to determine local minima and maxima of ESR spectra, but can also be used for various other kind of data.
1 | find_Peaks(x, interval, th = 10)
|
x |
|
interval |
|
th |
|
The algorithm characterises a peak by comparing the y-value at each x-value to its neighbouring y-values.
The threshold value specified by th
determines to how many neighbours the value
is compared to, so that lower values of th
yield more peaks than higher
threshold values.
A data.frame containing the x- and y-values of each peak is returned.
Christoph Burow, University of Cologne (Germany)
1 2 3 4 5 6 7 8 9 10 11 12 | # Import Bruker ELEXSYS500 spectrum (ASCII)
file <- system.file("extdata", "dpph.ASC", package = "ESR")
spec <- read_Spectrum(file)
# Use the function
peaks1 <- find_Peaks(spec)
# Since spec is an object of class ESR.Spectrum, you can also use
# its get-method
peaks2 <- spec$get_peaks()
identical(peaks1, peaks2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.