[R] force fixed format

Pravin jadhavpr at vcu.edu
Thu Jan 1 23:52:55 CET 2004


formatC(p,format="fg")
or
formatC(p,format="f",digits=#)

#-specify number of digits

should do the job.


 
Pravin
 
Pravin Jadhav

-----Original Message-----
From: r-help-bounces at stat.math.ethz.ch
[mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Fredrik Lundgren
Sent: Thursday, January 01, 2004 3:05 PM
To: R-help
Subject: [R] force fixed format

Hello,
A small problem I can't solve

 > p <- 0.0001
> p
[1] 1e-04

How can I force the printout of p to 0.0001?
I have tried 'format', 'round', 'signif', 'print' in different combinations
without success.
                      
Fredrik Lundgren

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




More information about the R-help mailing list