mz <- c(100.212, 169.071, 169.078, 300.321)
intensity <- c(0.3716, 7.917962, 100., 66.83)
peaks <- matrix(c(mz, intensity), ncol = 2, byrow = FALSE)
clean_spectrum(peaks, min_mz = 0, max_mz = 1000, noise_threshold = 0.01,
min_ms2_difference_in_da = 0.02, min_ms2_difference_in_ppm = -1,
max_peak_num = 100, normalize_intensity = TRUE)
Run the code above in your browser using DataLab