Hi !
Could anyone let me know as how I can do a wilcoxon signed rank test for data frames. I saw some people have attempted to explain at the stack flow.
link : http://stackoverflow.com/questions/21271449/how-to-apply-the-wilcox-test-to-a-whole-dataframe-in-r
I have a huge data frame of 360,000 probes and 24 subjects.
I am trying to use this script
out <- lapply(df, function(x) pairwise.wilcox.test(d[[x]], d$group))
names(out) <- names(d)
out
I keep getting the error
> out <- lapply(df, function(x) pairwise.wilcox.test(d[[x]], d$group))
Error in .subset2(x, i, exact = exact) :
recursive indexing failed at level 2
Any help would be really great
Thank you
smeeta
My df is 360k x 24
You'll probably want to use apply() rather than lapply. lapply on a data.frame works on the columns. Instead, apply() can work on either rows or columns.
Thank you