title: How to run one way ANOVA in R
body: <p>I've a dataset looking like this:</p>
  
  <pre><code>&gt; print(mydata)
                  col1                 col2                col3
  1               0.819               0.851               0.874
  2               0.972               0.703               0.821
  3               0.891               0.790               0.951
  4               0.839               0.799               0.819
  </code></pre>
  
  <p>I would like to know if there are significant differences between the three groups <code>col1</code>, <code>col2</code> and <code>col3</code>. For this matter, my guess is that the best way is to run an <code>anova</code> test.</p>
  
  <p>Please find below the script I used to produce the dataset, to run the test and the Error displayed by R:</p>
  
  <pre><code>
  &gt; mydata &lt;- data.frame(col1, col2, col3)
  &gt; accuracymetrics &lt;- as.vector(mydata)
  &gt; anova(accuracymetrics)
  </code></pre>
  
  <blockquote>
    <p>Error in UseMethod("anova") :    no applicable method for 'anova'
    applied to an object of class "data.frame"</p>
  </blockquote>
  
  <p>It's the first time I'm running such an analysis in R so bear with me if this question is not interesting for the forum. Any input to solve this error is appreciated!</p>