get_percentile: Finding percentile

Description Usage Arguments Value Examples

Description

Find the percentile of the value specified in numeric vector.

Usage

1
get_percentile(x, value, from = 0, to = 1, eps = 1e-06)

Arguments

x

numeric. a numeric vector.

value

numeric. a scalar to find percentile value from vector x.

from

numeric. Start interval in logic to find percentile value. default to 0.

to

numeric. End interval in logic to find percentile value. default to 1.

eps

numeric. Threshold value for calculating the approximate value in recursive calling logic to find the percentile value. (epsilon). default to 1e-06.

Value

list. Components of list. is as follows.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
carat <- ggplot2::diamonds$carat

quantile(carat)

get_percentile(carat, value = 0.5)
get_percentile(carat, value = median(diamonds$carat))
get_percentile(carat, value = 1)
get_percentile(carat, value = 7)

## End(Not run)

bit2r/kodlookr documentation built on Dec. 19, 2021, 9:49 a.m.