title: Kruskal-Wallis test on multiple columns at once
body: <p>This maybe sounds a bit simple, but I cannot get the answer.</p>
  
  <p>I have a dataset in R that has 26 samples in rows and many variables (>20) in columns. Some of them are categorical, so what I need to do is to carry out a Kruskal Wallis test for each numerical variable depending on each categorical one, so I do:</p>
  
  <pre><code>env_fact &lt;- read.csv("environ_facts.csv")
  
  kruskal.test(env_fact-1 ~ Categorical_var-1,  data=env_fact)
  </code></pre>
  
  <p>But with this I can only do the test to the numerical variables one by one, which is tiresome. </p>
  
  <p>Is there any way to carry all the Kruskal-Wallis tests for all numerical variables at once?
  I can repeat it by each categorical variable, since I only have 4, but for the numerical one I have more than 20!!</p>
  
  <p>Thanks a lot</p>