title: Show Kruskal-Wallis test ranks
body: <p>I performed a kruskal wallis test on multi-treatment data where I compared five different methods. </p>
  
  <p>A friend showed me the calculation in spss and the results included the mean ranks of each method.</p>
  
  <p>In R, I only get the <code>chi2</code> and <code>df value</code> and <code>p-value</code> when applying <code>kruskal.test</code> to my data set. those values are equal to the ones in spss but I do not get any ranks. </p>
  
  <p>How can I print out the ranks of the computation?
  My code looks like this:</p>
  
  <pre><code> comparison &lt;- kruskal.test(all,V3,p.adj="bon",group=FALSE, main="over")
  </code></pre>
  
  <p>If I print comparison I get the following:</p>
  
  <pre><code>Kruskal-Wallis rank sum test
  data:  all
  Kruskal-Wallis chi-squared = 131.4412, df = 4, p-value &lt; 2.2e-16
  </code></pre>
  
  <p>But I would like to get something like this additional output from spss:</p>
  
  <pre><code>Type    H   Middle Rank
  1,00    57  121.11
  2,00    57  148.32
  3,00    57  217.49
  4,00    57  53.75
  5,00    57  174.33
  total   285 
  </code></pre>
  
  <p>How do I get this done in r?</p>