Pairwise wilcox test error
1
0
Entering edit mode
3.8 years ago
celia.escher ▴ 20

Dear all,

I am having trouble to run the pairwise.wilcox.test function with my qPCR data. I have a table with gene expression values from 4 different patient groups loaded in R as a matrix. Afterward, I reduce the matrix to a new one with expression data from only one gene (numeric) and the group condition (factor with 4 levels) without any row names. However, the function is not working. I also tried building the group factor separately, releveled it, and implemented it in my matrix, and the function is still not working (the matrix structure still shows the gene expression as numeric and the group as factor with 4 levels). I tried with the R example dataset PlantGrowth and it works... the example dataset and my data seem to have the same structure, so I do not know what else I can do.

The error that shows is as follows:

pairwise.wilcox.test(my_dataB3~Count, my_dataB3~group)
Error in unique.default(x, nmax = nmax) : 
  unique() applies only to vectors

Thank you so much in advance!

R • 1.6k views
ADD COMMENT
2
Entering edit mode
3.8 years ago

Hi,

I believe that you're indexing the data wrongly.

Can you try:

pairwise.wilcox.test(my_dataB3$Count, my_dataB3$group)

António

ADD COMMENT
0
Entering edit mode

It works now! Thank you so much! I think I used ~ because I was using wilcox.test and kruskal.test functions before...

ADD REPLY

Login before adding your answer.

Traffic: 2745 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