title: I'm having trouble understanding what the 'fct_reorder2()' function does
body: <p>I'm trying to understand what the <code>fct_reorder2()</code> does but the R documentation is not clear on this. Below is copied from help for this function:</p>
  <pre><code>df &lt;- tibble::tribble(
    ~color,     ~a, ~b,
    &quot;blue&quot;,      1,  2,
    &quot;green&quot;,     6,  2,
    &quot;purple&quot;,    3,  3,
    &quot;red&quot;,       2,  3,
    &quot;yellow&quot;,    5,  1
  )
  df$color &lt;- factor(df$color)
  #&gt; Levels: blue green purple red yellow
  
  fct_reorder(df$color, df$a, min)
  #&gt;Levels: blue red purple yellow green
  
  fct_reorder2(df$color, df$a, df$b)
  #&gt; Levels: purple red blue green yellow
  </code></pre>
  <p>Can someone help me understand why <code>fct_reorder2()</code> sorts the data this way?</p>