Exponential Operation is an arithmetic operation in R which calculates the power of one numeric variable with another. This recipe demonstrates how to carry out the Exponential operation using two numeric variables while storing them in a third variable.
We assign numbers to two variables
a = 10 b = 4
We use the arithmetic operator " ^ " to carry out this task and finally store the result in a third variable
# storing the result of the modulus arithmetic operation of the two numbers stored in variables 'a' and 'b' in 'result' result = a ^ b # displaying the value stored in result result
Alternatively, we can also complete the operation without assigning any variables to it. Just like a calculator. This is done simply by writing the operation as mentioned below and pressing 'enter'
10 ^ 4