title: Error in trying to use the group_by and summarise functions with dplyr in R
body: <p>I have been trying to summarise a set of data using <code>dplyr</code> in R. This is the code I have been using and it had been working fine up until recently.</p>
  <pre><code>library(tidverse);library(curl)
  data&lt;-read.csv(curl(&quot;https://raw.githubusercontent.com/megaraptor1/mydata/main/data.csv&quot;))
  data2&lt;-data %&gt;%
    group_by(e.taxon) %&gt;%
    summarise(across(c(e.hbl,e.bm), weighted.mean, e.N), 
              N = sum(e.N))
  </code></pre>
  <p>&quot;Error: Problem with <code>summarise()</code> input <code>..1</code>.
  x 'x' and 'w' must have the same length
  i Input <code>..1</code> is <code>(function (.cols = everything(), .fns = NULL, ..., .names = NULL) ...</code>.
  i The error occurred in group 2: e.taxon = &quot;Abrocoma_bennettii&quot;.&quot;</p>
  <p>Now I know the purported reason for this error: two of the columns don't have the same length or have missing values. However, when I check to see which of the columns is producing the error, it says that all of the variables have the same number of entries (i.e., no missing data).</p>
  <pre><code>length(data$e.taxon)
  length(data$e.hbl)
  length(data$e.bm)
  length(data$e.N)
  </code></pre>
  <p>I tried searching for this error message to see if there is more information behind it that I could use, but I could not find anything. What's really strange is this code was working fine until some unknown change, and due to the way the file is set up I cannot easily identify where the new changes are that might have produced this (the example is part of a larger shared dataset). I am trying to figure out why R is returning this error when all of the data have complete cases.</p>