title: R: p-value for each row from anova & lm()
body: <p>I'm trying to conduct an anova for each row and then extract the p-values for plotting. As a reference, I'm trying to adapt code from this post: <a href="https://stackoverflow.com/questions/51920287/r-extracting-p-value-for-each-row-from-t-test/51920870?noredirect=1#comment90829302_51920870">R, extracting p-value for each row from t.test</a></p>
  
  <p>Here is my snippet:</p>
  
  <pre><code>&gt; anova.007.mRNA&lt;-x007 %&gt;%
  + rowwise() %&gt;%
  + mutate(pval = anova(c(C1,C2,C3,C4,C5,C6),
  + c(H1,H2,H3,H4,H5,H6))$p.value) %&gt;%
  + ungroup()
  </code></pre>
  
  <p>...but I get an error?</p>
  
  <pre><code>Error in mutate_impl(.data, dots) : 
    Evaluation error: no applicable method for 'anova' applied to an object of class "c('double', 'numeric')".
  </code></pre>
  
  <p>This is odd since I thought the anova test would be applied in a similar fashion?  maybe I needed to create a linear model lm() first?</p>