select_percentile: Get the row corresponding to a given percentile

Description Usage Arguments Details Value Examples

View source: R/select_percentile.R

Description

Get the row corresponding to a given percentile

Usage

1
select_percentile(df = NULL, percentile = NULL, descend = FALSE)

Arguments

df

A 'data.frame' object for which a percentile is required. Other data structures are not yet supported.

percentile

The percentile required eg 10 percentile

descend

Logical. Should the data be arranged in descending order? Defaults to FALSE.

Details

Returns the value corresponding to a percentile. Returns mean values if the position of the percentile is whole number. Values are sorted in ascending order. You can change this by setting descend to TRUE.

Value

A dataframe showing the row corresponding to the required percentile.

Examples

1
2
data("yields", package="manymodelr")
select_percentile(yields,5)

manymodelr documentation built on Nov. 15, 2021, 5:07 p.m.