Description Usage Arguments Value Author(s) Examples
removeIntensities
allows to remove intensities from chromatographic data
matching certain conditions (depending on parameter which
). The
intensities are actually not removed but replaced with NA_real_
. To
actually remove the intensities (and the associated retention times)
use clean()
afterwards.
Parameter which
allows to specify which intensities should be replaced by
NA_real_
. By default (which = "below_threshod"
intensities below
threshold
are removed. If x
is a XChromatogram
or XChromatograms
object (and hence provides also chromatographic peak definitions within the
object) which = "outside_chromPeak"
can be selected which removes any
intensity which is outside the boundaries of identified chromatographic
peak(s) in the chromatographic data.
1 2 3 4 5 6 7 8 9 10 11 12 | ## S4 method for signature 'Chromatogram'
removeIntensity(object, which = "below_threshold", threshold = 0)
## S4 method for signature 'MChromatograms'
removeIntensity(object, which = "below_threshold", threshold = 0)
## S4 method for signature 'XChromatogram'
removeIntensity(
object,
which = c("below_threshold", "outside_chromPeak"),
threshold = 0
)
|
object |
an object representing chromatographic data. Can be a
|
which |
|
threshold |
|
the input object with matching intensities being replaced by NA
.
Johannes Rainer
1 2 3 4 5 6 | chr <- Chromatogram(rtime = 1:10 + rnorm(n = 10, sd = 0.3),
intensity = c(5, 29, 50, NA, 100, 12, 3, 4, 1, 3))
## Remove all intensities below 20
res <- removeIntensity(chr, threshold = 20)
intensity(res)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.