percent_rank {SparkR}R Documentation

percent_rank

Description

Window function: returns the relative rank (i.e. percentile) of rows within a window partition.

Usage

## S4 method for signature 'missing'
percent_rank()

percent_rank(x)

Details

This is computed by:

(rank of row in its partition - 1) / (number of rows in the partition - 1)

This is equivalent to the PERCENT_RANK function in SQL.

See Also

Other window_funcs: cume_dist, cume_dist; dense_rank, dense_rank; lag, lag; lead, lead; ntile, ntile; rank, rank; row_number, row_number

Examples

## Not run: percent_rank()

[Package SparkR version 1.6.0 Index]