# NOT RUN {
# Loading example data
data(australia)
spectra(australia) <- sr_no ~ ... ~ 350:2500
# Aggregation on the whole collection
m <- aggregate_spectra(australia, fun = mean)
plot(m)
# Aggregation factor-wise
# Generate some kind of factor
australia$fact <- sample(LETTERS[1:3], size = nrow(australia), replace = TRUE)
m <- aggregate_spectra(australia, fun = mean, id = 'fact')
plot(m)
# }
Run the code above in your browser using DataLab