R/rankNumberForGivenPercentile.R

Defines functions rankNumberForGivenPercentile

Documented in rankNumberForGivenPercentile

#' Compute the rank given percentile and list lenght
#' 
#' @param percentile A numeric percentile we wish to compute the corresponding rank for
#' @param length A numeric lenght of the set of numbers
#' @return A numeric rank 
#' @export
rankNumberForGivenPercentile <- function(percentile,length){
  return(round(percentile*length,0))
}
msxakk89/dat documentation built on Aug. 3, 2020, 6:39 p.m.