How can I create a correlation matrix in R with spectral ratios and a variable of interest?
I want to create a correlation matrix where on the x-axis I have my wavelength from 400-1000 nm, on the y-axis the same and the values in the matrix are the correlation of my variable of interest “X” against the spectral ratios |(wavelength1 – wavelength2)/ (wavelength1 + wavelength2)|