R programming: How do I get Euler's number?

Solution 1:

The R expression

exp(1)

represents e, and

exp(2)

represents e^2.

This works because exp is the exponentiation function with base e.

Solution 2:

-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