Christian Hennig wrote:
I would like to use the format function to get numbers all with three digits to the right of the decimal point, even in cases where there is no
significant digit left. For example, I would like to get
c(0.3456789,0.0000053) as "0.346" "0.000".
I posted a fairly complete example of doing this some time ago. If you search the list archives under my name, you should be able to find it. It's not at hand right now, or I would post it again. The key was using formatC(), but my example had other little issues worked out as well.
MHP
-- Michael H. Prager, Ph.D. Population Dynamics Team NOAA Center for Coastal Habitat and Fisheries Research NMFS Southeast Fisheries Science Center Beaufort, North Carolina 28516 USA http://shrimp.ccfhrb.noaa.gov/~mprager/
______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
