I have a data table that consists of a Wavenumber column and 48 other columns for Intensity. Is there a way to use a for loop to plot each Intensity column with the Wavelength column, so I’d end up with 48 separate plots?
Furthermore, is there a way to put all of these plots in a PDF file?
I have tried using
for (i in df){
plot(Wavenumber, i)
}
This gives me the correct plot, but I would rather use ggplot2 because of all the customization. When I try with ggplot2 though, no graphs pop up.