venerdì 1 giugno 2007

R number output format

I'd like to save the number 0.0000012 to a file just as it appears:
?formatC
formatC(.000000012, format='fg')
[1] "0.000000012"
also
?sprintf
sprintf("%.10f", 0.0000000012)
[1] "0.0000000012"
or
format(.0000012, scientific=FALSE)
[1] "0.0000012"

Nessun commento:

Posta un commento