rank {SparkR}R Documentation

rank

Description

Window function: returns the rank of rows within a window partition.

Usage

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

rank(x, ...)

Details

The difference between rank and denseRank is that denseRank leaves no gaps in ranking sequence when there are ties. That is, if you were ranking a competition using denseRank and had three people tie for second place, you would say that all three were in second place and that the next person came in third.

This is equivalent to the RANK function in SQL.

See Also

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

Examples

## Not run: rank()

[Package SparkR version 1.6.1 Index]