how can I show an number not rounded, but in the format, eg. x.xxxx e.g.> signif(1-pf(((RSSred-RSSful)/2)/(RSSful/(34-3)),2,34-3),digits = 5)shows [1] 0 but I need something like [1] 2.2e-16 thanks christoph -- Christoph Lehmann Phone: ++41 31 930 93 83 Department of Psychiatric Neurophysiology Mobile: ++41 76 570 28 00 University Hospital of Clinical Psychiatry Fax: ++41 31 930 99 61 Waldau lehmann at puk.unibe.ch CH-3000 Bern 60 http://www.puk.unibe.ch/cl/pn_ni_cv_cl.html
format.pval() as in: format.pval(1-pf(((RSSred-RSSful)/2)/(RSSful/(34-3)),2,34-3),digits = 5) see ?format for more information Gav %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% Dr. Gavin Simpson [T] +44 (0)20 7679 5522 ENSIS Research Fellow [F] +44 (0)20 7679 7565 ENSIS Ltd. & ECRC [E] gavin.simpson at ucl.ac.uk UCL Department of Geography [W] http://www.ucl.ac.uk/~ucfagls/cv/ 26 Bedford Way [W] http://www.ucl.ac.uk/~ucfagls/ London. WC1H 0AP. %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% -----Original Message----- From: r-help-admin at stat.math.ethz.ch [mailto:r-help-admin at stat.math.ethz.ch] On Behalf Of Christoph Lehmann Sent: 28 February 2003 13:18 To: r-help at stat.math.ethz.ch Subject: [R] show numbers not rounded how can I show an number not rounded, but in the format, eg. x.xxxx e.g.> signif(1-pf(((RSSred-RSSful)/2)/(RSSful/(34-3)),2,34-3),digits = 5)shows [1] 0 but I need something like [1] 2.2e-16 thanks christoph -- Christoph Lehmann Phone: ++41 31 930 93 83 Department of Psychiatric Neurophysiology Mobile: ++41 76 570 28 00 University Hospital of Clinical Psychiatry Fax: ++41 31 930 99 61 Waldau lehmann at puk.unibe.ch CH-3000 Bern 60 http://www.puk.unibe.ch/cl/pn_ni_cv_cl.html ______________________________________________ R-help at stat.math.ethz.ch mailing list http://www.stat.math.ethz.ch/mailman/listinfo/r-help
>>>>> "GS" == Gavin Simpson <gavin.simpson at ucl.ac.uk> >>>>> on Fri, 28 Feb 2003 13:42:21 -0000 writes:GS> format.pval() as in: GS> format.pval(1-pf(((RSSred-RSSful)/2)/(RSSful/(34-3)),2,34-3),digits = 5) GS> see ?format for more information and if you want to make sure not to suffer from unnecessary precision cancellation, use pf(S, df1,df2, lower.tail = FALSE) instead of 1 - pf(S, df1,df2, lower.tail = FALSE) E.g. > pf(180, 2,31, lower.tail = FALSE) [1] 8.656982e-18 > 1 - pf(180, 2,31) [1] 0 Martin Maechler <maechler at stat.math.ethz.ch> http://stat.ethz.ch/~maechler/ Seminar fuer Statistik, ETH-Zentrum LEO C16 Leonhardstr. 27 ETH (Federal Inst. Technology) 8092 Zurich SWITZERLAND phone: x-41-1-632-3408 fax: ...-1228 <>< GS> -----Original Message----- GS> From: r-help-admin at stat.math.ethz.ch [mailto:r-help-admin at stat.math.ethz.ch] GS> On Behalf Of Christoph Lehmann GS> Sent: 28 February 2003 13:18 GS> To: r-help at stat.math.ethz.ch GS> Subject: [R] show numbers not rounded GS> how can I show an number not rounded, but in the format, eg. x.xxxx GS> e.g. >> signif(1-pf(((RSSred-RSSful)/2)/(RSSful/(34-3)),2,34-3),digits = 5) GS> shows GS> [1] 0 GS> but I need something like GS> [1] 2.2e-16 GS> thanks GS> christoph GS> -- GS> Christoph Lehmann Phone: ++41 31 930 93 83 GS> Department of Psychiatric Neurophysiology Mobile: ++41 76 570 28 00 GS> University Hospital of Clinical Psychiatry Fax: ++41 31 930 99 61 GS> Waldau lehmann at puk.unibe.ch GS> CH-3000 Bern 60 http://www.puk.unibe.ch/cl/pn_ni_cv_cl.html