R/PercentAbove.R

#' PercentAbove
#'
#' Return the percentage of a list that is above a threshold
#'
#' @param x A list of numeric values.
#' @param threshold A numeric threshold value.
#'
#' @return double
#' @export
#'
PercentAbove <- function(x, threshold){
  return(length(x = x[x > threshold]) / length(x = x))
}
milescsmith/SeuratPlotly documentation built on June 5, 2019, 1:16 a.m.