# How to Compute Eulerâ€™s Number in R (Example)

In this article, Iâ€™ll illustrate how to **get Eulerâ€™s numberâ€™** in the R programming language.

The tutorial consists of this content:

Letâ€™s dive into it.

## Example: Computing Eulerâ€™s Number (e) in R

The following code illustrates how to get Eulerâ€™s number (e) using the exp() function provided by the basic installation of the R programming language.

exp(1) # Euler's number (e) # 2.718282

We can also use the exp command to compute e^2 by simply inserting a 2 within the exp function:

exp(2) # Euler's number to the power of 2 (e^2) # 7.389056

The previous R codes can be used to return Eulerâ€™s number, because the exp function computes the exponentiation with base e.

## Video & Further Resources

Would you like to learn more about the computation of Eulerâ€™s number in Râ€™? Then you may want to have a look at the following video instruction of my YouTube channel. In the video instruction, I illustrate the R codes of this tutorial in a live programming session.

*The YouTube video will be added soon.*

Furthermore, you may want to read some of the other tutorials on statisticsglobe.com. I have published numerous tutorials already:

In summary: In this tutorial, I explained how to **calculate Eulerâ€™s numberâ€™** in the R programming language. Let me know in the comments, in case you have additional questions and/or comments.