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).
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).
It can be achieved by disabling scientific notation in R.
Copyoptions(scipen = 999)
The "e" is a symbol for base-10 scientific notation. The "e" stands for $\times 10^{\rm exponent}$. So -1.861246e-04 means $-1.861246 \times 10^{-4}$. In fixed-point notation that would be -0.0001861246.
This notation is pretty standard. Even Microsoft Excel understands it, not just R.
I cannot yet comment so this answer will be a response to @Mark L. Stone : OP also stated that he's getting covariance matrix values in the scientific notation. Obviously the negative value must be one of the covariances.
To not be completely OT I will just add that working with scientific notation to me looks a bit clunky(especially if you are publishing the results). To supress the notation in R use the command options(scipen=alpha) where alpha is the maximum number of digits for the result to be still expressed in fixed notation.
R writes weird numbers and multiples of e instead of actual numbers on my axis
What does the constant e in an R program output mean? - Stack Overflow
soft question - What is the meaning of this number displayed in my R environment? - Mathematics Stack Exchange
In R, using scientific notation 10^ rather than e+ - Stack Overflow
Hey, i am trying to figure out R for a university project i have to do. I plotted some data with the code plot(variableA~variableB, data=mydata) and it gave me a plot which looks overall good, but instead of using the actual numbers it uses things like „2e+04“ and 8e+04“. I dont want that, how do i change it?
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.
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}

The R expression
exp(1)
represents e, and
exp(2)
represents e^2.
This works because exp is the exponentiation function with base e.
-digamma(1) is the Euler's Constant in R.
e, (exp(1) in R), which is the natural base of the natural logarithm
Euler's Constant. Euler's Number
Hi guys! I just started learning R and I was trying some basic percentage calculations and I don't know why but my RStudio is showing the results like this instead of " 0.00039975146 " as I was expecting.
Does anyone know how to fix this?
nycflights13 database