3

Ho do I get the conventional p value (in decimal places) when every time I get these scientific notations?

I tried format option but still get the same

> format(1.3e-12, width=5)
[1] "1.3e-12"
BenMorel
  • 34,448
  • 50
  • 182
  • 322
mani
  • 251
  • 2
  • 6
  • 9
  • possible duplicate of [Force R not to use exponential notation (e.g. e+10)?](http://stackoverflow.com/questions/9397664/force-r-not-to-use-exponential-notation-e-g-e10) – Jota Jan 20 '14 at 09:23

1 Answers1

5
 format(1.3e-12, scientific=FALSE)
[1] "0.0000000000013"
lukeA
  • 53,097
  • 5
  • 97
  • 100
  • Thanks. How do I trim it to a desired width? for say 5? – mani Jan 20 '14 at 09:44
  • There are numerous ways like `substr(format(1.3e-12, scientific=FALSE),0,6); sprintf("%6f",1.3e-12); format(1.23456789, digits=5)` ... – lukeA Jan 20 '14 at 09:58