R/keep_peaks.R

Defines functions keep_peaks

Documented in keep_peaks

#' @title Keep peaks
#'
#' @description This function keeps a proportion of peaks
#'
#' @param x PeakData
#' @param prop Minimal ratio to the max peak
#'
#' @return NULL
#'
#' @export
#'
#' @examples NULL
keep_peaks <- function(x, prop) {
  x > max(x, na.rm = TRUE) / prop
}
taxonomicallyinformedannotation/tima-r documentation built on July 17, 2024, 7:11 p.m.