title: how to change values with rank value (ordered value) in R? and I want to give same numbers when two values tie
body: <p>My data has an ID column and I want to rename ID as an rank. In other words I want to rename all 35-> 1, all 39->2, all 66 ->3 all 77-> 4 and all 90 -> 5 from below data. <br/>
  I tried to use rank function but I could not deal with two tied value. I want to give same number for two tied value in id (e.g. all 35 get 1).<br/>
  How can I change each id as an ascending order number?</p>
  
  <pre><code>ID
  --
  35
  35
  35
  35
  39
  39
  39
  66
  66
  66
  66
  77
  77
  90
  90
  90
  </code></pre>