resample.spectrum: Resample a spectrum to a given wavelength vector

Description Usage Arguments Value Warning Author(s) See Also

View source: R/resample.spectrum.R

Description

The function is basically a wrapper to approx. It takes a spectrum that is resampled to a wavelength vector given as the second argument.

Usage

1
resample.spectrum(input, target)

Arguments

input

an object of class spectrum that is to be resampled

target

either an object of class spectrum (in which case only component lambda is used) or a numeric vector containing wavelength at which the spectrum is to be sampled.

Value

An object of class spectrum. Most components are straight copies from input, except

lambda

this is the wavelength vector target (or its lambda component)

value, contdiv, contsub

the interpolation of input$lambda and (if present) input$contsub and contdiv onto lambda

noise

Since the function does not deal with the noise component of input, this is set to NULL

Warning

Note that "resampling" actually means "interpolating". I have not written a proper resampling code yet. Also, the function does not deal with the noise vector associated with the input spectrum.

Author(s)

Oliver Czoske

See Also

approx


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