powered by
Calculate spectral entropy of a spectrum
calculate_spectral_entropy(peaks)
A double value of spectral entropy.
A matrix of peaks, with two columns: m/z and intensity.
mz <- c(100.212, 300.321, 535.325) intensity <- c(37.16, 66.83, 999.0) peaks <- matrix(c(mz, intensity), ncol = 2, byrow = FALSE) calculate_spectral_entropy(peaks)
Run the code above in your browser using DataLab