Combines and plots spectra (by taking the average and the standard deviation, for example) according to an index or a vector of identities.
aggplot( rspecdata, by = NULL, FUN.center = mean, FUN.error = sd, lcol = NULL, shadecol = NULL, alpha = 0.2, legend = FALSE, ... )
rspecdata | (required) a data frame, possibly of class |
---|---|
by | (required) either a single value specifying the range of spectra
within the data frame to be combined (for example, |
FUN.center | the function to be applied to the groups of spectra,
calculating a measure of central tendency (defaults to |
FUN.error | the function to be applied to the groups of spectra,
calculating a measure of variation (defaults to |
lcol | colour of plotted lines indicating central tendency. |
shadecol | colour of shaded areas indicating variance measure. |
alpha | transparency of the shaded areas. |
legend | automatically add a legend. |
... | additional graphical parameters to be passed to plot. |
Plot containing the lines and shaded areas of the groups of spectra.
Montgomerie R (2006) Analyzing colors. In: Hill G, McGraw K (eds) Bird coloration. Harvard University Press, Cambridge, pp 90-147.
Rafael Maia rm72@zips.uakron.edu, Chad Eliason cme16@zips.uakron.edu
# Load reflectance data data(sicalis) # Create grouping variable based on spec names bysic <- gsub("^ind[0-9].", "", names(sicalis)[-1]) # Plot using various error functions and options aggplot(sicalis, bysic)