weighted.rank: Weighted rank estimation

View source: R/utilities.R

weighted.rankR Documentation

Weighted rank estimation

Description

Conducts weighted ranking on the basis of sums of weights per unique raw score. Please provide a vector with raw values and an additional vector with the weight of each observation. In case the weight vector is NULL, a normal ranking is done. The vectors may not include NAs and the weights should be positive non-zero values. With equal weights, the result reproduces the mid-ranks of base R's rank() (ties.method = "average").

Usage

weighted.rank(x, weights = NULL)

Arguments

x

A numerical vector

weights

A numerical vector with weights; should have the same length as x

Value

the weighted absolute ranks


cNORM documentation built on July 13, 2026, 5:08 p.m.