# NOT RUN {
library(spectrolab)
spec = as_spectra(spec_matrix_example, name_idx = 1)
# remove spec of species with less than 4 samples
spec = subset_by(spec, by = names(spec), n_min = 4, n_max = Inf)
# }
Run the code above in your browser using DataLab