Learn R Programming

posterior (version 1.6.0)

r_scale: Rank values

Description

Compute ranks for a numeric array, that is, replace each value by its rank. Average rank for ties are used to conserve the number of unique values of discrete quantities.

Usage

r_scale(x)

Value

A numeric array of ranked values with the same size and dimension as the input.

Arguments

x

(numeric) A scalar, vector, matrix, or array of values.