title: pick elements cumulatively from a vector in R
body: <p>I'm using the following to cumulatively (i.e., <em>first pick first 2 elements and each time add 1 more; see output below</em>) pick elements from vector <code>mods</code> below. I wonder if there is a faster or simpler approach to doing this in BASE R?</p>
  
  <pre><code>n &lt;- names(mtcars) # BASE R dataset
  
  lapply(seq_along(n)[-1], function(i)n[seq_len(i)]) # any faster or simpler approach here?
  
  [[1]]
  [1] "mpg" "cyl"
  
  [[2]]
  [1] "mpg"  "cyl"  "disp"
  
  [[3]]
  [1] "mpg"  "cyl"  "disp" "hp"  
  
  [[4]]
  [1] "mpg"  "cyl"  "disp" "hp"   "drat"
  </code></pre>