wilcoxon signed rank test for data frame
0
0
Entering edit mode
@smeeta-shrestha-6393
Last seen 8.1 years ago

 


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 

 

 

 

wilcoxon signed rank test data frame affy • 3.6k views
ADD COMMENT
0
Entering edit mode

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.  

ADD REPLY
0
Entering edit mode

Thank you 

ADD REPLY

Login before adding your answer.

Traffic: 425 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6