.peakRegionMask | R Documentation |
This function finds the mz region spanning by a peak. It creates an 0/1 matrix used for multiplications in other functions.
.peakRegionMask(x, p, k = 30L)
x |
|
p |
|
k |
|
A matrix
with a column for each peak in p
and 2 * k + 1
rows where the middle row k + 1
is the peak centroid. If the values is 1
the index belongs to the peak region.
Sebastian Gibb
Other extreme value functions:
localMaxima()
,
refineCentroids()
,
valleys()
ints <- c(5, 8, 12, 7, 4, 9, 15, 16, 11, 8, 3, 2, 3, 2, 9, 12, 14, 13, 8, 3)
mzs <- seq_along(ints)
peaks <- which(localMaxima(ints, hws = 3L))
m <- MsCoreUtils:::.peakRegionMask(ints, peaks, k = 5L)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.