title: What is causing 'object not found' error in filter() with the across() function?
body: <p>This function filters/selects one or more variables from my dataset and writes it to a new CSV file. I'm getting an 'object not found' error when I call the function. Here is the function:</p>
  <pre><code>    extract_ids &lt;-  function(filename, opp, ...) {
    
    #Read in data
    df &lt;- read_csv(filename)
    
    #Remove rows 2,3
    df &lt;- df[-c(1,2),]
      
      #Filter and select
      df_id &lt;- filter(df, across(..., ~ !is.na(.x)) &amp; gc == 1) %&gt;%
        select(...) #not sure if my use of ... here is correct
      
      #String together variables for export file path
      path &lt;- c(&quot;/Users/stephenpoole/Downloads/&quot;,opp,&quot;_&quot;,...,&quot;.csv&quot;) #not sure if ... here is correct
      
      #Export the file
      write_csv(df_id, paste(path,collapse=''))
      
    
  }
  </code></pre>
  <p>And here is the function call. I'm trying to get columns &quot;rid&quot; and &quot;cintid.&quot;</p>
  <pre><code>extract_ids(filename = &quot;farmers.csv&quot;,
              opp = &quot;farmers&quot;,
              rid, cintid)
  </code></pre>
  <p>When I run this, I get the below error:</p>
  <pre><code> Error: Problem with `filter()` input `..1`.
  ℹ Input `..1` is `across(..., ~!is.na(.x)) &amp; gc == 1`.
  x object 'cintid' not found
  </code></pre>
  <p>The column cintid is correct and appears in the data. I've also tried running it with just one column, rid, and get the same 'object not found' error.</p>