Compute percentile rank
prank.Rd
Compute percentile rank
Examples
x <- c(1, 2, NA, 10)
prank(x)
#> [1] 0.3333333 0.6666667 NA 1.0000000
prank(airquality$Ozone)
#> [1] 0.62068966 0.56465517 0.13362069 0.26293103 NA 0.45689655
#> [7] 0.39224138 0.28448276 0.06034483 NA 0.04310345 0.22844828
#> [13] 0.11206897 0.19396552 0.26293103 0.19396552 0.53448276 0.02586207
#> [19] 0.48706897 0.11206897 0.00862069 0.11206897 0.01724138 0.51724138
#> [25] NA NA NA 0.39224138 0.65948276 0.96551724
#> [31] 0.58189655 NA NA NA NA NA
#> [37] NA 0.47413793 NA 0.79310345 0.59913793 NA
#> [43] NA 0.39224138 NA NA 0.34051724 0.58189655
#> [49] 0.30603448 0.13362069 0.15948276 NA NA NA
#> [55] NA NA NA NA NA NA
#> [61] NA 0.99137931 0.69827586 0.51724138 NA 0.76293103
#> [67] 0.61206897 0.82758621 0.93534483 0.93534483 0.89224138 NA
#> [73] 0.09482759 0.43965517 NA 0.04310345 0.68965517 0.54741379
#> [79] 0.74137931 0.85344828 0.75000000 0.22844828 NA NA
#> [85] 0.86206897 0.94827586 0.30603448 0.71551724 0.87068966 0.70689655
#> [91] 0.76293103 0.72844828 0.59913793 0.07758621 0.22844828 0.84051724
#> [97] 0.54741379 0.78448276 0.98275862 0.90517241 0.95689655 NA
#> [103] NA 0.63793103 0.45689655 0.77586207 NA 0.36206897
#> [109] 0.72844828 0.39224138 0.50000000 0.63793103 0.34051724 0.07758621
#> [115] NA 0.65948276 1.00000000 0.80603448 NA 0.81896552
#> [121] 0.97413793 0.87931034 0.89224138 0.92241379 0.84051724 0.80603448
#> [127] 0.91379310 0.68103448 0.51724138 0.30603448 0.39224138 0.34051724
#> [133] 0.42672414 0.63793103 0.34051724 0.45689655 0.07758621 0.15948276
#> [139] 0.67241379 0.26293103 0.15948276 0.42672414 0.22844828 0.15948276
#> [145] 0.39224138 0.56465517 0.04310345 0.19396552 0.48706897 NA
#> [151] 0.19396552 0.26293103 0.30603448