title: How to assign order to elements in a column in R?
body: <p>In the following dataset:</p>
  
  <pre><code>Day   Place   Name
   22     X      A
   22     X      A
   22     X      B
   22     X      A
   22     Y      C
   22     Y      C
   22     Y      D
   23     X      B
   23     X      A
  </code></pre>
  
  <p>How can I assign numbering to the variable Name in following order using R:</p>
  
  <pre><code>Day   Place   Name  Number
   22     X      A     1
   22     X      A     1
   22     X      B     2
   22     X      A     1
   22     Y      C     1
   22     Y      C     1
   22     Y      D     2
   23     X      B     1
   23     X      A     2
  </code></pre>
  
  <p>In a nutshell, I need to number the names according to their order to occurrence on a certain day and at a certain place.</p>