title: Use sample() without replacement multiple times with increasing sample size in R
body: <p>I want to take "random" samples from a vector called <code>data</code> but with increasing <code>size</code> and without replacement.</p>
  
  <p>To illustrate my point <code>data</code> looks for example like:</p>
  
  <pre><code>data&lt;-c("a","s","d","f","g","h","j","k","l","x","c","v","b","n","m")
  </code></pre>
  
  <p>What I need is to get different sampling vectors with increasing sampling size (starting with size=2) for example by 2 but without duplicates between the different vectors and store everything into a list so that the result would look something like this:</p>
  
  <pre><code>sample_1&lt;-c("s","d")
  sample_2&lt;-c("s","d","a","f")
  sample_3&lt;-c("s","d","a","f","m","n")
  sample_4&lt;-c("s","d","a","f","m","n","l","c")
  sample_5&lt;-c("s","d","a","f","m","n","l","c","j","x")
  sample_6&lt;-c("s","d","a","f","m","n","l","c","j","x","v","k")
  sample_7&lt;-c("s","d","a","f","m","n","l","c","j","x","v","k","g","b")
  sample_8&lt;-c("s","d","a","f","m","n","l","c","j","x","v","k","g","b","h")
  samples&lt;-list(sample_1,sample_2,sample_3,sample_4,sample_5,sample_6,sample_7,sample_8)
  </code></pre>
  
  <p>What i have so far is:</p>
  
  <pre><code>samples&lt;-sapply(seq(from=2, to=length(data), by=2), function(i) sample(data,size=i,replace=F),simplify=F,USE.NAMES=T )
  </code></pre>
  
  <p>What does not work is to have the increasing sample size but keeping the samples of the previous steps and to have a last list element with all observations.
  Is something like this possible? </p>