Learn R Programming

LearningRlab (version 2.2)

percentile_: Percentile Calculus Function

Description

This function calculate the percentiles of a vector of numbers

Usage

percentile_(x, p)

Arguments

x

Should be a vector

p

Should be a number, 0 => y =< 1

Value

A vector sorted with the elements divided by 100 parts

Details

To calculate the percentiles, the user should give a vector. This function divide the dataset in 100 parts as equal as possible. The formula is the following:

Examples

Run this code
# NOT RUN {
{
    #data creation
    data = c(1,4,3,3,2,5,7,12,1,2,3,12)
    
    percentile_(data,0.3)
    
}
# }

Run the code above in your browser using DataLab