library(ggplot2)
library(tidyr)
data("spectra")
spectra <- gather(spectra, sample, absorption, -wavelength)
ggplot(spectra, aes(x = wavelength, y = absorption, group = sample)) +
geom_line(size = 0.1)
Run the code above in your browser using DataLab