[R] cor.test observations limit

About this list Date view Thread view Subject view Author view Attachment view

From: Ming-Chung Li (mli@emmes.com)
Date: Wed 02 Apr 2003 - 04:57:01 EST


Message-id: <3.0.5.32.20030401135701.009f71a0@host2a.emmes.com>

Hi,

Is there a limit on the number of observations for using cor.test. For
example,

> library(ctest)
> cor.test(rnorm(3000), rnorm(3000), method="spearman")
Error in if (q > (n^3 - n)/6) pspearman(q - 1, n, lower.tail = FALSE) else
pspearman(q, :
        missing value where logical needed
In addition: Warning message:
NAs introduced by coercion

I mainly want to calculate the spearman correlation rho for a data with
missing values. But the rcorr function in Hmisc library (from
Hmisc_1.4.2.zip) gave me an error message

> library(Hmisc)
> rcorr(tmp[5600:5900,1:2], type="spearman")
Error in rcorr(tmp[5600:5900, 1:2], type = "spearman") :
        NA/NaN/Inf in foreign function call (arg 1)

Any help is appreciated,

Ming-Chung Li

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


About this list Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.3 : Tue 01 Jul 2003 - 09:11:35 EST