format.pval is documented and accessible from outside of base.
So you do not have to qualify it as base::format.pval
On 10/3/2011 11:24 AM, Liviu Andronic wrote:
> Thanks all for your pointers. The following does trick:
>> base::format.pval(x$p.value) ##Hmisc also has such a function
> [1] "<2e-1
Thanks all for your pointers. The following does trick:
> base::format.pval(x$p.value) ##Hmisc also has such a function
[1] "<2e-16"
On Mon, Oct 3, 2011 at 10:25 AM, Rolf Turner wrote:
> Isn't it true that 0 < 2.2e-16?
>
Yes, but it doesn't mean that the p-value actually hits absolute zero.
An
One point to note, for information, in this discussion is
that cor.test() has apparently returned the P-value as
an exact zero:
x$p.value == 0
# [1] TRUE
identical(x$p.value, 0)
# [1] TRUE
(which, by the way, I was led to after trying log10(x$p.value)
and getting -Inf). Perhaps a more in
> is(x)
[1] "htest"
> # take a look at stats:::print.htest
> format.pval(x$p.value)
[1] "< 2.22e-16"
Does that answer your question?
KK
On Mon, Oct 3, 2011 at 10:53 AM, Liviu Andronic wrote:
> Dear all
> How does print.htest display the p-value in scientific notation?
>> (x <- cor.test(iris
Isn't it true that 0 < 2.2e-16?
cheers,
Rolf Turner
On 03/10/11 20:53, Liviu Andronic wrote:
Dear all
How does print.htest display the p-value in scientific notation?
(x<- cor.test(iris[[1]], iris[[3]]))
Pearson's product-moment correlation
data: iris[[1]] and iris[[3]
Dear all
How does print.htest display the p-value in scientific notation?
> (x <- cor.test(iris[[1]], iris[[3]]))
Pearson's product-moment correlation
data: iris[[1]] and iris[[3]]
t = 21.65, df = 148, p-value < 2.2e-16
alternative hypothesis: true correlation is not equal to 0
95 percen
6 matches
Mail list logo