I have a graph here with Wavenumber as the primary x-axis. I have another column in my data table called Wavelength, that is a direct conversion from every data point in the Wavenumber column. Is there a way to put the Wavelength column on the top of the graph to have a secondary x-axis? Both Wavenumber and Wavelength will have the same amount of variables.
This is what I have for the original plot.
ggplot(new_df_test, aes(x = Wavenumber, y = X2024.05.17T12.35.56)) + geom_line()
I have tried using sec_axis() in scale_x_continuous, but I get an error saying:
"breaks" and "labels" have different lengths.