title: Error in HSD Tukey test in R
body: <p>I am working with a one way anova and want to run a posthoc test. I keep getting an Error: </p>
  
  <blockquote>
    <p>Error in UseMethod("TukeyHSD") : 
      no applicable method for 'TukeyHSD' applied to an object of class "function"</p>
  </blockquote>
  
  <p>I still cannot find a solution.</p>
  
  <p>My Data looks like this:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>Treatment IND
  T 1 7
  T 1 7
  T 1 10
  T 1 5
  T 1 10
  T 1 10
  T 1 12
  T 1 8
  T 1 1
  T 1 8
  T 1 14
  T 1 9
  T 1 10
  T 1 10
  T 1 6
  T 1 9
  T 1 9
  T 1 11
  T 1 2
  T 1 6
  T 1 5
  T 1 9
  T 1 11
  T 1 9
  T 1 7
  T 1 12
  T 1 11
  T 1 8
  T 1 10
  T 1 9
  T 1 11
  T 1 9
  T 1 4
  T 1 9
  T 1 11
  T 1 11
  T 1 9
  T 1 12
  T 1 13
  T 1 11
  T 1 9
  T 1 10
  T 1 7
  T 1 7
  T 1 8
  T 1 11
  T 1 1
  T 2 7
  T 2 8
  T 2 5
  T 2 8
  T 2 4
  T 2 5
  T 2 3
  T 2 3
  T 2 4
  T 2 4
  T 2 5
  T 2 4
  T 2 5
  T 2 6
  T 2 4
  T 2 8
  T 2 7
  T 2 5
  T 2 6
  T 2 6
  T 2 3
  T 2 7
  T 2 4
  T 2 4
  T 2 4
  T 2 6
  T 2 5
  T 2 6
  T 2 6
  T 2 3
  T 2 5
  T 2 5
  T 2 7
  T 2 7
  T 2 5
  T 2 3
  T 2 6
  T 2 6
  T 2 7
  T 2 7
  T 2 5
  T 2 3
  T 2 7
  T 2 6
  T 2 8
  T 2 5
  T 2 7
  T 2 5
  T 2 6
  T 3 7
  T 3 11
  T 3 8
  T 3 10
  T 3 7
  T 3 10
  T 3 10
  T 3 6
  T 3 9
  T 3 8
  T 3 7
  T 3 14
  T 3 9
  T 3 8
  T 3 15
  T 3 13
  T 3 5
  T 3 9
  T 3 9
  T 3 10
  T 3 10
  T 3 12
  T 3 13
  T 3 10
  T 3 9
  T 3 10
  T 3 7
  T 3 9
  T 3 9
  T 3 11
  T 3 7
  T 3 11
  T 3 7
  T 3 11
  T 3 9
  T 3 10
  T 3 7
  T 3 5
  T 3 9
  T 3 10
  T 3 11
  T 3 12
  T 3 11
  T 3 9
  T 3 9
  T 3 4
  T 3 7
  T 3 6
  T 3 4</code></pre>
  </div>
  </div>
  </p>
  
  <p>Then the ANOVA result is:</p>
  
  <blockquote>
    <p>oneway.test(IND~Umsiedlung)</p>
  </blockquote>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code> 
  One-way analysis of means (not assuming equal variances)
  
  data:  IND and Treatment
  F = 52.778, num df = 2.000, denom df = 86.334, p-value = 1.063e-15</code></pre>
  </div>
  </div>
  
  The Tukey posthoc test:</p>
  
  <blockquote>
    <p>tukey.test&lt;--TukeyHSD(x=oneway.test(IND~Umsiedlung),conf.level=0.95)</p>
  </blockquote>
  
  <p>tukey.test</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>Error in UseMethod("TukeyHSD") : 
    no applicable method for 'TukeyHSD' applied to an object of class "htest"</code></pre>
  </div>
  </div>
  </p>
  
  <p>Is anything wrong with my command or dataset? I know this is a very primary question... but if anyone could help me, it would be appreciated! Thanks.</p>