percentile_: Percentile Calculus Function

View source: R/Statistics.R

percentile_R Documentation

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

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:
percentile.jpg

Value

A vector sorted with the elements divided by 100 parts

Note

A vector is created by c(), like c(1,2,3,4,5) creates a vector with the numbers: 1,2,3,4,5

Author(s)

Dennis Monheimius, dennis.monhemimius@edu.uah.es
Eduardo Benito, eduardo.benito@edu.uah.es
Juan Jose Cuadrado, jjcg@uah.es
Universidad de Alcala de Henares

Examples

{
    #data creation
    data = c(1,4,3,3,2,5,7,12,1,2,3,12)
    
    percentile_(data,0.3)
    
}

LearningRlab documentation built on Aug. 31, 2023, 1:08 a.m.