When there are ties in the original data, is there a way to create a ranking without gaps in the ranks (consecutive, integer rank values)? Suppose:
x <-
For those fond of using dplyr:
dplyr
dense_rank(x) [1] 2 2 2 1 1 3 3