search for: two_way_anova

Displaying 1 result from an estimated 1 matches for "two_way_anova".

2011 Mar 23
1
Function to crop p-values from multiple Anovas
...167 263 711 392 sample7 old drug 155 252 242 547 sample8 old control 333 348 295 300 Now I would like to define a function that will crop the p-values from an Anova (so that I can use the function with a 'for loop' later on to go through all the genes): > p.fun <- function(arg) { two_way_anova <- aov(arg ~ age * treatment, data = example.df) two_way_sum <- summary(two_way_anova) p_values <- two_way_sum[[1]]$"Pr(>F)"[1:3] return(p_values) } Unfortunately my setup seems to be flawed as I'm not capable to call my function: > p.fun(gene1) Error in eval(expr, en...