Search code examples
reulers-number

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


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


Solution

  • The R expression

    exp(1)
    

    represents e, and

    exp(2)
    

    represents e^2.

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