title: How to do group_by in Tidymodel Recipes
body: <p>I would like to do something like this using the recipes package in Tidymodels:</p>
  <pre><code>library(dplyr)
  df %&gt;%
    group_by(RespID) %&gt;%
    mutate(Col5 = as.integer(all(c('A', 'B') %in% Col4) &amp; Col4 == 'A')) %&gt;%
    ungroup
  </code></pre>
  <p>I am able to run something with <code>step_mutate</code>, however cannot use the <code>group_by</code> functionality. How can I incorporate the process I'm taking in the script above into Tidymodel Recipes?</p>
  <pre><code>recipe &lt;- recipe( ~ field1 + field2 + field3, data = training) %&gt;%
    step_mutate(response= as.factor(all(c('A', 'B') %in% Col4) &amp; Col4 == 'A'), role=&quot;outcome&quot;)
  
  </code></pre>