peak_maxima | R Documentation |
Detect peak maxima
peak_maxima(
data,
focus = 10,
k = 35,
peaks = 1,
n = 1,
method = "gam",
max_iter = 20,
group_vars = c("date", "sample", "param"),
x_var = "time",
y_var = "conc"
)
data |
A tibble returned by |
focus |
Peaks occurring at x values less than or equal to this value are not considered. For FFF data, this is the focus period. |
k |
The basis dimension of the generalized additive model used to detect peak minima. |
peaks |
Number of peaks. |
n |
Before detecting peak minima, compute an n-point moving average of the detector response using
|
method |
Algorithm for peak detection. Either "gam", which separates peaks by the minima between them, or "sigma" which recursively calculates the standard deviation by eliminating values greater than three standard deviations. N.B., method = "sigma" silently removes NAs from x and y. |
max_iter |
Maximum iterations for method = "sigma". |
group_vars |
Grouping variables for input to |
x_var |
Name of x variable. |
y_var |
Name of y variable. |
A tibble of peak retention times and the corresponding maxima in detector response.
path <- system.file("extdata", package = "fffprocessr")
data <- combine_fff(load_icp(path))
data <- data[data$param == "65Cu", ]
peak_maxima(data, peaks = 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.