Percentile rank is frequently defined by the following formula:
Percentile rank = (L/N)*100
L=Number of values in dataset lower than or equal to value of interest N=number of data points
In R, it is common to calculate percentile rank of values in a vector by
Percentile_Rank=rank(vec)/length(vec)*100)
However, I would like to use a slightly modified definition of percentile rank, which is defined by the same formula as above but
L = Number of values in dataset strictly lower than the value of interest
This is similar to the PERCENTILERANK.EXC function in Excel.
Is there a function built into R to calculate this? Otherwise, how can I do it?