I have a number which show as
a <- 1.34467773e-5.
I want to format it to
a <- 1.34e-5.
How can I do it?
Thanks.
formatC(a, format = "e", digits = 2)
You could also use the function sprintf. For example:
sprintf
sprintf("%.1e", 0.00008765)