[R] engineering notation format

From: Walker, Sam <s-walker_at_ti.com>
Date: Fri 07 Jul 2006 - 07:58:21 EST


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



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Fri Jul 07 08:02:35 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Fri 07 Jul 2006 - 18:17:25 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.