title: rep() with each equals a vector
body: <p>I have quick question regarding sequence and <code>each</code>:</p>
  
  <pre><code>vect1 &lt;- c(4, 5, 10, 3, 1)
  </code></pre>
  
  <p>I want replicate with this vector as each such that first number is replicated 4, second 5, third 10, fourth 3, and fifth equal 1. </p>
  
  <pre><code>rep(1:5, each = vect1) 
   [1] 1 1 1 1 2 2 2 2 3 3 3 3 4 4 4 4 5 5 5 5
  Warning message:
  In rep(1:5, each = vect1) : first element used of 'each' argument
  
  rep(1:5, each = c(4, 5, 10, 3, 1)) 
  
      [1] 1 1 1 1 2 2 2 2 3 3 3 3 4 4 4 4 5 5 5 5
      Warning message:
      In rep(1:5, each = c(4, 5, 10, 3, 1)) :
        first element used of 'each' argument
  </code></pre>
  
  <p>I know this is misuse of each. </p>