Subsetting speclibs
Function to return subsets of Speclib
s by defined conditions.
## S4 method for signature 'Speclib' subset(x, subset, ...)
x |
Object of class 'Speclib'. |
subset |
Logical expression indicating spectra to keep: missing values are taken as false. Multiple expressions can be applied using logical operators AND and OR. See details section. |
... |
Further arguments passed to |
Object of class Speclib
.
Lukas Lehnert, Wolfgang Obermeier
data(spectral_data) ## Return names of SI data names(SI(spectral_data)) ## Divide into both seasons sp_summer <- subset(spectral_data, season == "summer") sp_spring <- subset(spectral_data, season == "spring") ## Divide into both seasons and years sp_summer_14 <- subset(spectral_data, season == "summer" & year == 2014) sp_spring_14 <- subset(spectral_data, season == "spring" & year == 2014) ## Plot all speclibs plot(sp_spring_14, col="green", ylim = c(0,80)) plot(sp_summer_14, col="red", new = FALSE)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.