Learn R Programming

rineq (version 0.3.0)

rank_wt: Calculates the weighted rank

Description

Calculates the weighted rank

Usage

rank_wt(x, wt)

Value

A numeric vector containing weighted fractional ranks of the elements of x.

Arguments

x

numeric vector

wt

weights

Author

Peter Konings

References

Kakwani et al., 1997.

Examples

Run this code
x <- sample(1:10, size = 10, replace = TRUE)
x.weight <- seq(0, 1, length.out = 10)
rank_wt(x, wt = x.weight)

Run the code above in your browser using DataLab