title: kruskal.test shows "All group levels must be finite" error. What is the problem?
body: <p>I have a data set having a value and a group, e.g.,</p>
  
  <pre><code>Val Grp
  123 "A"
  231 "A"
  132 "A"
  234 "A"
  445 "B"
  345 "B"
  235 "B"
  345 "B"
  </code></pre>
  
  <p>(The original dataset would be too large to show here.)</p>
  
  <p>When I now do <code>kruskal.test(data$Val, data$Grp)</code>, I get an error saying <code>all group levels must be finite.</code> When I check the data with <code>is.finite()</code>, I can see that all values are indeed finite.</p>
  
  <p>The internet does not yield a lot of information on this error, so I have hope that someone could shed light on what this error means and what the problem could be.</p>