Skip to contents

This function calculates the percentiles of a vector of values using one of three methods: "a", "b", or "c".

Usage

percentile_vector(data, method = "c")

Arguments

data

A numeric vector representing the dataset.

method

The method to use for calculating the percentiles. Options are "a", "b", or "c". Defaults to "c".

Value

A numeric vector containing the percentiles of the input data.

Examples

data <- c(1, 2, 3, 4, 5)
percentile_vector(data, method = "c")
#> [1] 10 30 50 70 90