dense_rank {SparkR}R Documentation

dense_rank

Description

Window function: returns the rank of rows within a window partition, without any gaps. The difference between rank and dense_rank is that dense_rank leaves no gaps in ranking sequence when there are ties. That is, if you were ranking a competition using dense_rank 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.

Usage

dense_rank(x)

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

Details

This is equivalent to the DENSE_RANK function in SQL.

See Also

Other window_funcs: cume_dist, lag, lead, ntile, percent_rank, rank, row_number

Examples

## Not run: dense_rank()

[Package SparkR version 2.0.0 Index]