Cut absorption features
Function cuts absorption features to a user-specified range. Since features may differ among spectra, it might be important to cut the features to specific wavelengths ranges.
cut_specfeat(x, ..., fnumber, limits)
x | 
 An object of class   | 
fnumber | 
 A vector of the positions of the features in x to be cut.  | 
limits | 
 A vector containing the start and end wavelength for each fnumber. The corresponding feature will be cut to this specified range.  | 
... | 
 Further arguments passed to generic functions. Currently ignored.  | 
The typical workflow to obtain feature properties is to first calculate the band 
depth transformSpeclib, then isolate the absorption features 
specfeat. Optionally, cut_specfeat allows to 
cut the features at specified wavelengths. Finally use feature_properties
to retrieve characteristics of the features.
An object of class Specfeat containing the cut features.
Hanna Meyer and Lukas Lehnert
data(spectral_data)
##Example to cut the features around 450nm and 700nm to a specific range
## Transform speclib
bd <- transformSpeclib(subset(spectral_data, season == "summer"),
                       method = "sh", out = "bd")
## Convert speclib to specfeat giving center wavelength of features
featureSelection <- specfeat(bd, c(450,700,1200,1500))
## Cut 1st and 2nd feature to [310 nm, 560 nm] and [589 nm, 800 nm]
featuresCut <- cut_specfeat(x = featureSelection, fnumber = c(1,2), 
                            limits = c(c(310, 560), c(589, 800)))
## Plot result (1st and 2nd feature)
plot(featuresCut, fnumber = 1:2)Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.