[R] engineering notation format

Walker, Sam s-walker at ti.com
Thu Jul 6 23:58:21 CEST 2006


Hi,

How can I format numbers to engineering notation?

That is, like scientific but where the exponent is always a multiple of
three.

Some examples:

1635 000 000      => 1.635E9
  163 500 000     => 163.5E6
0.000 000 000 135 => 135E-9

I've tried format and formatC but I couldn't get them to work they I
want.

Any help is greatly appreciated.


Thanks,
Sam



More information about the R-help mailing list