convert.mask: Utility function to create a mask vector from a variety of...

Description Usage Arguments Value Author(s) See Also Examples

Description

The function makes sure that a mask is a vector along a given wavelength vector, converting input such as a file name or a data.frame.

Usage

1
convert.mask(x, mask)

Arguments

x

a wavelength vector or an object of class spectrum

mask

Normally the name of a file or of a data.frame with components x1 and x2 giving the left and right limits of the wavelength regions to be masked. Can also be a logical scalar or vector, but then the function does not do much.

Value

a logical vector along the wavelength vector x or x$lambda, with TRUE for pixels outside the wavelength regions given by mask

Author(s)

Oliver Czoske

See Also

fit.spectrum

Examples

1
2
3
lambda <- seq(3750, 5000, by=5)
mask.df <- data.frame(x1=c(4000, 4500), x2=c(4050, 4600))
mask <- convert.mask(lambda, mask.df)

oczoske/slacR documentation built on May 20, 2019, 8:23 p.m.