FWIW: that  is a nice "approach" ;)  and rankdata seems to function correctly whenever multiple identical values are there.