[R] how to set the number format to pure numeric?

Prof Brian Ripley ripley at stats.ox.ac.uk
Tue Aug 24 18:09:26 CEST 2004


On Tue, 24 Aug 2004 lichi at physics.uoguelph.ca wrote:

> I want to export a numeric matrix in pure numeric format, i.e. I want
> 0.0001 to appear as "0.0001". But it seems the default setting for
> write.table is scientific notation, i.e. it will appear as "1e-04". how to
> set the number format to pure numeric? Thank you very much for your help.

It's not the default, BTW.  Try 0.002, say.
See ?options and look at `scipen' to alter the rules.

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595




More information about the R-help mailing list