title: Wilcox.test error: 'x' and 'y' must have the same length
body: <p>Currently trying to run a grouped wilcox.test on relative humidity (erh) and temperature (temp) data. The dataframe looks like this:</p>
  
  <pre><code>head(sw_1d_wilcox_data, n = 25)
  
  # A tibble: 25 x 3
    sens_type   erh     temp
      &lt;chr&gt; &lt;dbl&gt;    &lt;dbl&gt;
   1        OS  32.4 19.60000
   2        OS  32.4 19.52727
   3        OS  32.4 19.50000
   4        OS  32.4 19.50000
   5        OS  32.4 19.50000
   6        OS  32.4 19.50000 (...) # chopped it here for simplicity.
  </code></pre>
  
  <p>The variable "sens_type" is sensor type, and either DE or OS. I want to run a paired wilcox.test on both the "erh" and "temp" variables, grouped by sensor (i.e. OS against DE). My goal is to see if the sensors are different in terms of their measurements. It is paired data, as the sensors were in the same experimental container. My understanding of how to do this is:</p>
  
  <pre><code>wilcox.test(erh ~ sens_type, data = sw_1d_wilcox_data, paired = TRUE)
  </code></pre>
  
  <p>but I get the error:</p>
  
  <pre><code>Error in wilcox.test.default(x = c(97.4624454975128, 97.4624454975128, 
  : 'x' and 'y' must have the same length
  </code></pre>
  
  <p>All variables are in correct classes (temp and erh = numeric, sens_type = character). </p>
  
  <p>I've looked high and low, cannot find a post directly addressing this issue. Any help is greatly appreciated! </p>
  
  <p>** a bonus would be some tag suggestions - I can't find a wilcoxon/wilcox tag or appropriate error tag (unclear to me how to use the existing ones).</p>