I have some data that looks like this:
Value <- c(-0.07, -0.07, -0.0003, 0.45, 0.45, 1.2, 1.4, 1.4, 1.4)
I need to convert it to "ranked" data but I would like all ties to be given the same value AND the rankings to be sequential, such that:
# new.value
1 1 2 3 3 4 5 5 5
I've tried the rank()
function in R but I'm having trouble with the ties.