R/deletePeaks.R

Defines functions deletePeaks

Documented in deletePeaks

deletePeaks <- function(x, min = NULL){

  if (!isMassPeaksList(x)) {
    stop("x must be a list of MassPeaks class objects")
  }
  
  if (is.null(min)){
    stop("A minimum peak height value must be given")
  }
  
  lapply(x, function(xx) xx[intensity(xx) >= min])

}

Try the MALDIrppa package in your browser

Any scripts or data that you put into this service are public.

MALDIrppa documentation built on March 29, 2022, 1:05 a.m.