title: Counting the cumulative sum of unique values in a vector
body: <p>Given a vector of length n, in which m unique elements exist, I want to count frequency of each m. </p>
  
  <p>I've been able to do this using dplyr. My issue is that the output does not look simple enough.</p>
  
  <pre><code>vector &lt;- (5, 3, 3, 2, 5, 1, 4, 1, 5, 5)
  </code></pre>
  
  <p>I would like the output to just be a vector with the cumulative sum of each unique element without actually specifying the element. For the example above it should just be: (2, 1, 2, 1, 4)</p>