WindowSelection: Spectral window selection

Description Usage Arguments Details Value Author(s) Examples

View source: R/WindowSelection.R

Description

Selects an interval in the ppm scale and returns the value of the spectra in that interval.

Usage

1
WindowSelection(Spectrum_data, from.ws = 10, to.ws = 0.2, verbose = FALSE)

Arguments

Spectrum_data

Matrix containing the spectra in ppm, one row per spectrum.

from.ws

The left ppm value of the interval. A typical value is 10. If NULL, default value is the first index without NA.

to.ws

The right ppm value of the interval. A typical value is 0.2. If NULL, default value is the last index without NA.

verbose

If "TRUE", will print processing information.

Details

If from.ws and/or to.ws are not specified we calculate it so that we have the largest window without NA. Those NAs are typically produced by the InternalReferencing function.

Value

Spectrum_data

The matrix of the value of the spectra in the specified interval.

Author(s)

BenoƮt Legat & Manon Martin

Examples

1
2
3
4
5
6
require(PepsNMRData)
# The interval is chosen so that we have the largest interval without NA
Ws.spec <- WindowSelection(Data_HS_sp$Spectrum_data_HS_9)

# or
Ws.spec <- WindowSelection(Data_HS_sp$Spectrum_data_HS_9, from.ws=10, to.ws=0.2)

ManonMartin/PepsNMR documentation built on Nov. 28, 2021, 6:22 p.m.