I'm trying to do a one-way anova on several row of a dataset and extract the p_value to use it afterwards.
Here's what i've done:
anova <- function(x) {summary(aov(x ~ bt.factor))[[1]]["Pr(>F)"]}
anv.pval <- apply(golubALL, 1, anova)
With this formula i'm able to extract the pvalue but it comes with other elements:
$`1414_at`
Pr(>F)
bt.factor 0.7871
Residuals
What I would like to have as a result is only this in a list. How could I extract it ?