mask: Masks a spectral region

Description Usage Arguments Details Value Examples

View source: R/mask_extract.R

Description

mask discards a spectral region

Usage

1
2
3
4
mask(x, ...)

## S3 method for class 'collection'
mask(x, from, to, overlaps = "keep", skip = FALSE, ...)

Arguments

x

Acollection object

...

further arguments passed to or from other methods(not currenctly used).

from, to

Coordinates of the region to mask. Use -Inf or Inf to shorten the spectra.

overlaps

What to do with the bins ovelapping the edge of the mask. Use either keep of remove.

skip

Skip the creation of of processor step. If TRUE, this step will not be added to the list of processing steps. Typically reserved for nested function calls.

Details

The upper limit in not included: [min, max).

Value

An updated version of collection.

Examples

1
2
3
4
5
6
7
library(tidySpectR)

# Trimming one side
mask(fa_nmr, from = Inf, to = 7.2)

# Masking region
mask(fa_nmr, from = 3.5, to = 3, overlaps = 'remove')

CVUA-RRW/tidySpectR documentation built on April 13, 2021, 11:41 a.m.