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 <-
try to think about another way
x <- c(10,10,10,5,5,20,20) as.numeric(as.factor(x)) [1] 2 2 2 1 1 3 3