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

101

For example, how would I go about entering the value e^2 in R?

This question is tagged with r eulers-number

~ Asked on 2012-02-27 00:03:26

The Best Answer is


160

The R expression

exp(1)

represents e, and

exp(2)

represents e^2.

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

~ Answered on 2012-02-27 00:07:08


27

-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

~ Answered on 2016-01-20 20:58:42


Most Viewed Questions: