search for: two_way_sum

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

2011 Mar 23
1
Function to crop p-values from multiple Anovas
...trol 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, envir, enclos) : object 'gene1' not found > p.fun("...