calculate 99 percentile in r

To calculate the 99 percentile in R, you can use the quantile() function. The probs argument allows you to specify the percentile you want to calculate. Here's an example:

main.r
# create a vector of data
data <- c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)

# calculate the 99 percentile
quantile(data, probs = 0.99)  
129 chars
6 lines

The output would be 9.91, which means that 99% of the data values are less than or equal to 9.91.

gistlibby LogSnag