warning message in rcorr function
1
0
Entering edit mode
7.2 years ago
Edalat ▴ 30

hi all, when I want to calculate correlation by rcorr,the number of non coding is 23 and the number of coding is 634,R shows this warning message,what should I do?

res2=rcorr(coding,ncoding,type = "spearman")

Warning message:

In sqrt(npair - 2) : NaNs produced

I think because of Inequality of number of coding & noncoding there is this warning and for that reason I have NA at the end of correlation matrix,is it true?

rcorr correlation RNA-Seq • 5.4k views
ADD COMMENT
0
Entering edit mode

When npair <2, R can't calculate the square root. This is likely caused by your input not being of adequate dimensions. Check dim(coding) and dim(ncoding).

ADD REPLY
0
Entering edit mode
7.2 years ago
Edalat ▴ 30

Hi Jean,

dim(coding)

[1] 23 635

dim(ncoding)

[1] 23 24

23 is the number of samples ,24 and 635 is the number of coding and ncoding{23 noncoding+1 column that related to myfactor(the name of samples ) & 634coding+1 column that related to myfactor} ,what is the problem?

ADD COMMENT
0
Entering edit mode

Please use the 'Add reply' button to reply to a comment. This keeps the discussion organized. Also, don't create an answer to provide information as this gives the impression the question has already been answered. What are those +1 columns ? Are they numeric ?

ADD REPLY
0
Entering edit mode

you have a right,it is not Intentional.

no, the column was the name of sample,actually I removed that column by this function t4 <- t3[,-11] and now there is no that error.

ADD REPLY

Login before adding your answer.

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