title: mlr3 Error: Cannot combine stratification with grouping
body: <p><strong>Code Example:</strong></p>
  <pre><code># BLOCKING by &quot;userID&quot; 
  task$col_roles$group = &quot;userID&quot;
  # Remove &quot;userID&quot; from features
  task$col_roles$feature = setdiff(task$col_roles$feature, &quot;userID&quot;)
  
  # STRATIFICATION (by Target Variable!)
  task$col_roles$stratum = &quot;answer_code&quot;
  
  # Instantiate the resampling on the task:
  rsmp_scheme$instantiate(task)
  </code></pre>
  <p><strong>Problem</strong>:
  Trying to combine the resampling procedures &quot;Stratified resampling&quot; (stratified by target) and 2) &quot;Block resampling&quot; (grouping by userID) (see mlr3 gallery example: <a href="https://mlr3gallery.mlr-org.com/posts/2020-03-30-stratification-blocking/" rel="nofollow noreferrer">https://mlr3gallery.mlr-org.com/posts/2020-03-30-stratification-blocking/</a>) , the following error occurs:</p>
  <pre><code>Error: Cannot combine stratification with grouping
  </code></pre>
  <p><strong>Background Information</strong>:</p>
  <ul>
  <li>My data set includes several repeated measurements per user (different number available repeated measurements per person) -&gt; therefore, <strong>blocking or grouping per userID</strong> would be appropriate.</li>
  <li>In addition, the distribution of the target variable is very imbalanced, which is why a stratification by target would be appropriate.</li>
  </ul>
  <p><strong>Question:</strong> How can I implement both resampling methods in mlr3?</p>
  <p>Thanks for your help! :-)</p>