R/utilities.R
PercentAbove.Rd
Calculate the percentage of a vector above some threshold
PercentAbove(x, threshold)
Vector of values
Threshold to use when calculating percentage
Returns the percentage of x values above the given threshold
x
set.seed(42) PercentAbove(sample(1:100, 10), 75) #> [1] 0.2