calc_pctl: Calculate percentiles

View source: R/calc_pctl.R

calc_pctlR Documentation

Calculate percentiles

Description

Wrapper around quantile that returns a list and better names. Thus, also easier usable within j of data.table's.

Usage

calc_pctl(x, p, prefix = "p", ...)

Arguments

x

numeric vector

p

same as probs in quantile

prefix

prefix to add before percentile value (default: 'p')

...

other arguments passed to quantile

Value

list of percentiles with names "prefixX", where X is the percentile (probs*100).

Examples

x <- rnorm(1000)
calc_pctl(x)
calc_pctl(x, prefix = "pctl")


mitmat/mitmatmisc documentation built on Aug. 22, 2024, 3:28 a.m.