The Rank transformation