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: R, extracting p-value for each row from t.test
Here is my snippet:
> anova.007.mRNA<-x007 %>%
+ rowwise() %>%
+ mutate(pval = anova(c(C1,C2,C3,C4,C5,C6),
+ c(H1,H2,H3,H4,H5,H6))$p.value) %>%
+ ungroup()
...but I get an error?
Error in mutate_impl(.data, dots) :
Evaluation error: no applicable method for 'anova' applied to an object of class "c('double', 'numeric')".
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?