This is a bit of a grey area. You need to recall that R will always invoke a print method, and these print methods listen to some options. Including 'scipen' -- a penalty for scientific display. From help(options):

‘scipen’: integer. A penalty to be applied when deciding to print numeric values in fixed or exponential notation. Positive values bias towards fixed and negative towards scientific notation: fixed notation will be preferred unless it is more than ‘scipen’ digits wider.

Example:

CopyR> ran2 <- c(1.810032e+09, 4) 
R> options("scipen"=-100, "digits"=4)
R> ran2
[1] 1.81e+09 4.00e+00
R> options("scipen"=100, "digits"=4)
R> ran2
[1] 1810032000          4

That said, I still find it fudgeworthy. The most direct way is to use sprintf() with explicit width e.g. sprintf("%.5f", ran2).

Answer from Dirk is no longer here on Stack Overflow
Discussions

R writes weird numbers and multiples of e instead of actual numbers on my axis
Try setting options(scipen = 999). scipen determines when R uses normal vs. scientific (e.g. 1e-7) notation. Non-scientific notation is preferred unless the number is more than scipen digits wide. Here's a stackoverflow with more details. More on reddit.com
🌐 r/RStudio
14
2
August 25, 2020
What does the constant e in an R program output mean? - Stack Overflow
Releases Keep up-to-date on features we add to Stack Overflow and Stack Internal. ... Find centralized, trusted content and collaborate around the technologies you use most. Learn more about Collectives ... Bring the best of human thought and AI automation together at your work. Explore Stack Internal ... It's the textual version of 10 ... More on stackoverflow.com
🌐 stackoverflow.com
soft question - What is the meaning of this number displayed in my R environment? - Mathematics Stack Exchange
$\begingroup$ Thank you very much, that's weird, so the $e=10$ and the $-$ symbol doesn't mean the negative sign. $\endgroup$ ... $\begingroup$ Oh, the minus sign absolutely should have relevance here. @WADon probably just made a typo. 2.2e16 (also sometimes 2.2e+16) should be in reference ... More on math.stackexchange.com
🌐 math.stackexchange.com
June 12, 2020
In R, using scientific notation 10^ rather than e+ - Stack Overflow
This question may have been asked, but I didn't manage to find a straightforward solution. Is there a way to convert a number to its scientific notation, but in the form of 10^ rather than the defa... More on stackoverflow.com
🌐 stackoverflow.com
🌐
DataKwery
datakwery.com › post › 2020-07-11-scientific-notation-in-r
Scientific notation in R | DataKwery
July 11, 2020 - R uses scientific e notation where e tells you to multiple the base number by 10 raised to the power shown. Let’s start with the number 28. Scientific notation adds a decimal after the first number before applying the system.
🌐
Statology
statology.org › home › how to use the exp() function in r
How to Use the exp() Function in R
May 14, 2024 - Thus, if we calculate the log of a number using the log() function in R and then calculate the exponential using the exp() function then we will simply end up with the number that we started with: #create vector my_vector <- c(1, 2, 3, 4, 5, ...
🌐
FavTutor
favtutor.com › blogs › remove-scientific-notation-r
Removing Scientific Notations in R (3 Easy Methods)
March 13, 2024 - This expresses scientific notation with a number between 1 and 10 followed by the letter "e" and then a power of 10 with the sign. xe+n: x times the nth power of 10. xe-n: x times the negative nth power of 10.
Find elsewhere
🌐
Resbaz
resbaz.github.io › 2014-r-materials › lessons › 01-intro_r › r-basics.html
Getting started in R
See ?Comparison for more information (you can also get there by help("==")). ... Read e-XX as "multiplied by 10^XX", so 2e-4 is 2 * 10^(-4).
🌐
RDocumentation
rdocumentation.org › packages › base › versions › 3.6.2 › topics › log
log: Logarithms and Exponentials
log computes logarithms, by default natural logarithms, log10 computes common (i.e., base 10) logarithms, and log2 computes binary (i.e., base 2) logarithms. The general form log(x, base) computes logarithms with base base. log1p(x) computes \(\log(1+x)\) accurately also for \(|x| \ll 1\). ...
🌐
R-bloggers
r-bloggers.com › r bloggers › exponential numbers
Exponential Numbers | R-bloggers
February 3, 2014 - In Stata one can figure out what the exponential number means by typing: display 1e6, whereas in R it is enough to type: format(1e6, scientific=F). Now, if you want R to display only scientific number instead, you want to set options as: ...
Top answer
1 of 7
77

It's not ugly, but exactly what's expected. If you type

$2x-10$

then you expect that there is some space around the minus sign, because it denotes an operation. When you type $1e-10$, TeX interprets it in exactly the same way, because it can't read your mind: the two expressions are formally the same, only two symbols are different.

If you want that an expression that's normally interpreted as a polynomial should be treated in a different way, then you have to properly mark it.

One solution might be

$1\mathrm{e}{-10}$

because in this case the braces around -10 tell TeX to enter a subformula and so the minus sign is initial, so not interpreted as a binary operation, but as a unary operator.

You could make a definition, such as

\newcommand{\expnumber}[2]{{#1}\mathrm{e}{#2}}

and input the number as

$\expnumber{1}{-10}$

but there's a much better alternative, the package siunitx.

\documentclass{article}

\usepackage{siunitx}
\sisetup{output-exponent-marker=\ensuremath{\mathrm{e}}}

\begin{document}

\num{1e-10}

\end{document}

This package offers many more features than just printing numbers in the desired format; consult its documentation to find them.


Note that siunitx is not understood by MathJax, so with it you must stick to the “hand made” solution. You can still say, in it,

$\def\num#1{\numx#1}\def\numx#1e#2{{#1}\mathrm{e}{#2}}$ 

and a formula such as $\num{1e-10}$ will be printed in the way you want.

2 of 7
44

Take a look at the siunitx package. This is helpful for typesetting units and unitless numbers (among many other things). This works in text mode as well as math mode.

\documentclass{article}
\usepackage{siunitx}
\begin{document}
Number only: \num{1e-10}

Number with units: \SI{1e-10}{\meter\per\second}
\end{document}

🌐
R-lib
scales.r-lib.org › reference › label_scientific.html
Label numbers with scientific notation (e.g. 1e05, 1.5e-02) — label_scientific • scales
The examples demonstrate their use with x scales, but they work similarly for all scales, including those that generate legends rather than axes. Other labels for continuous scales: label_bytes(), label_currency(), label_glue(), label_number_auto(), label_number_si(), label_ordinal(), label_parse(), label_percent(), label_pvalue() Other labels for log scales: label_bytes(), label_log(), label_number_si() demo_continuous(c(1, 10)) #> scale_x_continuous() demo_continuous(c(1, 10), labels = label_scientific()) #> scale_x_continuous(labels = label_scientific()) demo_continuous(c(1, 10), labels = label_scientific(digits = 3)) #> scale_x_continuous(labels = label_scientific(digits = 3)) demo_log10(c(1, 1e9)) #> scale_x_log10()
🌐
Delft Stack
delftstack.com › home › howto › r › value of e in r
e in R | Delft Stack
February 26, 2025 - To find the value of e itself, you can raise it to the power of 1. ... In this code, we first call the exp() function with an argument of 1, which represents e raised to the power of 1. The result is stored in the variable e_value, and we print ...
🌐
Wikipedia
en.wikipedia.org › wiki › Scientific_notation
Scientific notation - Wikipedia
April 30, 2026 - This base ten notation is commonly used by scientists, mathematicians, and engineers, in part because it can simplify certain arithmetic operations. On scientific calculators, it is usually known as "SCI" display mode. In scientific notation, nonzero numbers are written in the form ... or m times ten raised to the power of n, where n is an integer, and the coefficient m is a nonzero real number (usually between 1 and 10 in absolute value, and nearly always written as a terminating decimal).
🌐
Quora
quora.com › How-does-e-mean-10
How does e mean 10? - Quora
... Former Professor Emeritus at University of Minnesota - Twin Cities · Author has 600 answers and 700.6K answer views · 5y ... E 10 is a fuel mixture of 10% anhydrous ethanol and 90% gasoline.