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 <rolf.tur...@xtra.co.nz> wrote:
> Isn't it true that 0 < 2.2e-16?
>

Yes, but it doesn't mean that the p-value actually hits absolute zero.
And cor.test, as Ted noticed, returns
> identical(x$p.value, 0)
[1] TRUE

Not that this makes a great practical difference in my case, but I
would still prefer to print "<2e-16" in my Sweave document.

Regards
Liviu

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to