Resample spectral data
resample(X, wav, new.wav, interpol = "spline", ...)
X |
numeric matrix or vector to resample (optionally a data frame that can be coerced to a numerical matrix). |
wav |
a numeric vector giving the original band positions. |
new.wav |
a numeric vector giving the new band positions. |
interpol |
the interpolation method: 'linear' or 'spline' (default). |
... |
additional arguments to be passed to the |
a matrix or vector with resampled values.
Antoine Stevens and Leonardo Ramirez-Lopez
data(NIRsoil) wav <- as.numeric(colnames(NIRsoil$spc)) # increase spectral resolution by 2 NIRsoil$spc_resampled <- resample(NIRsoil$spc, wav, seq(1100, 2498, 2)) dim(NIRsoil$spc) dim(NIRsoil$spc_resampled)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.