as_spectra function

Convert matrix or data frame to spectra