Learn R Programming

NCmisc (version 1.1.5)

pctile: Find data thresholds corresponding to percentiles

Description

Finds the top and bottom bounds corresponding to percentile 'pc' of the data 'dat'.

Usage

pctile(dat, pc = 0.01)

Arguments

dat

numeric vector of data

pc

the percentile to seek, c(pc, 1-pc)

Value

returns the upper and lower threshold

Examples

Run this code
# NOT RUN {
pctile(rnorm(100000),.025)
pctile(sample(100),.9)
# }

Run the code above in your browser using DataLab