NA p-value in R cor.test $R$ gives "NA" for the p-value when I try to run Kendall's test with an "exact p-value" flag set on a larger data set (n=170 seems to be the cutoff). Is this just a computation problem or something deeper? Spearman's test with an exact p-value flag set returns a p-value.
cor.test(sample(1:200),sample(1:200),method='kendall',exact=TRUE)

         Kendall's rank correlation tau

 data:  sample(1:200) and sample(1:200)
 T = 10905, p-value = NA
 alternative hypothesis: true tau is not equal to 0
 sample estimates:
       tau
 0.0959799
```


I suspect it's a computational issue to do with how cor.test calculates the p-value for method = "Kendall".
If you have a look at lines 92 - 108 of the source code for cor.test, you'll notice that it calls stats:::C_pKendall to calculate the p-value.
If you then dig further and have a look at the source for C_pKendall, you'll notice that there is a division term with a denominator of gammafn(n + 1) in line 96. Now gamma(n) returns Inf for n >= 172 (for integer valued n) in R, so I suspect this division terms ends up becoming Inf / Inf = NaN for n = length(x) >= 172, resulting in a p-value of NaN.
