Learn R Programming

NCmisc (version 1.2.0)

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)

Value

returns the upper and lower threshold

Arguments

dat

numeric vector of data

pc

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

Author

Nicholas Cooper njcooper@gmx.co.uk

Examples

Run this code
pctile(rnorm(100000),.025)
pctile(sample(100),.9)

Run the code above in your browser using DataLab