Description Usage Arguments Value Author(s) See Also Examples
View source: R/removePeaks2D.R
This function sets peaks at specified frequencies in a Spectra2D
object to NA
. This effectively removes these peaks from calculations of
contours which can speed things up and clarifies the visual presentation of data.
This function is useful for removing regions with large
interfering peaks (e.g. the water peak in 1H NMR), or regions that are primarily
noise. This function leaves the frequency axes intact. Note that the
parafac
function, used by pfacSpectra2D
, does not allow NA
in the input data matrices. See removeFreq
for a way to shrink
the data set without introducing NA
s.
1 | removePeaks2D(spectra, remF2 = NULL, remF1 = NULL)
|
spectra |
An object of S3 class |
remF2 |
A formula giving the range of frequencies to be set to |
remF1 |
As for |
An object of S3 class Spectra2D
.
Bryan A. Hanson, DePauw University.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | # Note we will set contours a bit low to better
# show what is going on.
data(MUD1)
plotSpectra2D(MUD1,
which = 7, lvls = 0.1, cols = "black",
main = "MUD1 Sample 7: Complete Data Set"
)
MUD1a <- removePeaks2D(MUD1, remF2 = 2.5 ~ 4)
sumSpectra(MUD1a)
plotSpectra2D(MUD1a,
which = 7, lvls = 0.1, cols = "black",
main = "MUD1 Sample 7\nRemoved Peaks: F2 2.5 ~ 4"
)
MUD1b <- removePeaks2D(MUD1, remF2 = low ~ 2)
sumSpectra(MUD1b)
plotSpectra2D(MUD1b,
which = 7, lvls = 0.1, cols = "black",
main = "MUD1 Sample 7\nRemoved Peaks: F2 low ~ 2"
)
MUD1c <- removePeaks2D(MUD1, remF1 = high ~ 23)
sumSpectra(MUD1c)
plotSpectra2D(MUD1c,
which = 7, lvls = 0.1, cols = "black",
main = "MUD1 Sample 7\nRemoved Peaks: F1 high ~ 23"
)
MUD1d <- removePeaks2D(MUD1, remF2 = 2.5 ~ 4, remF1 = 45 ~ 55)
sumSpectra(MUD1d)
plotSpectra2D(MUD1d,
which = 7, lvls = 0.1, cols = "black",
main = "MUD1 Sample 7\nRemoved Peaks: F2 2.5 ~ 4 & F1 45 ~ 55"
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.