R/countPeaks.R

Defines functions countPeaks

Documented in countPeaks

countPeaks <- function(x){

  if (!is.list(x)){
    if (!isMassPeaks(x)){
      stop("x must be a MassPeaks object")}
  }
  
  if (is.list(x)){
    if (!isMassPeaksList(x)){
      stop("x must be a list of MassPeaks objects")}
  }
  
  lengths(x)
  
}

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.