title: Split a vector into three vectors of unequal length in R
body: <p>a questions from a relative n00b: I’d like to split a vector into three vectors of different lengths, with the values assigned to each vector at random. For example, I’d like to split the vector of length 12 below into vectors of length 2,3, and 7</p>
  
  <p>I can get three equal sized vectors using this: </p>
  
  <pre><code>test&lt;-1:12
  split(test,sample(1:3))
  </code></pre>
  
  <p>Any suggestions on how to split test into vectors of 2,3, and 7 instead of three vectors of length 4?</p>