title: dplyr across with matches() Error: Problem with `mutate()` input `..1` 1` must be a vector, not a function
body: <p>A data frame:</p>
  <pre><code>library(scales)
  library(tidyverse)
  
  mydf &lt;- data.frame(
    x = 1:3,
    a_pct = c(0.3, 0.2, 0.1),
    y = letters[1:3],
    b_pct = c(0.5, 0.6, 0.7)
  )
  </code></pre>
  <p>I would like to mutate those fields where the name contains string '_pct'. Tried:</p>
  <pre><code>mydf %&gt;% mutate(across(matches('_pct'), ~percent))
  </code></pre>
  <p>Gives error:</p>
  <pre><code>Error: Problem with `mutate()` input `..1`.
  ℹ `..1 = across(matches(&quot;_pct&quot;), ~percent)`.
  x `..1` must be a vector, not a function.
  </code></pre>
  <p>Can I use <code>matches()</code> with <code>across()</code> in this way?</p>