The antilog of a number is the process of finding the original value from its logarithmic representation.

To find the antilog of values in R, you can use base of the logarithm and the exponentiation operator (^).

Method 1: Use base 10

log_value <- log10(value)

10^log_value

Method 2: Use base e

exp(value)

The following examples shows how to find antilog of values in R.

Calcualte Antilog of a Value Using Base 10

Let’s see how we can use base 10 to find antilog of value:

# Declare number
number = 2

# Take base 10
log_number = log10(number)

# Show log value
print(log_number)

# Take antilog
x <- 10^log_number

# Print antilog value
print(x)

Output:

[1] 0.30103

[1] 2

Here the output shows log and antilog value for number 2 which calculated using base 10.

Calculate Antilog of a Value Using exp() Function

Let’s see how we can use exp() function to find antilog of number:

# Declare number
number = 2

# Take log values of number
log_number <- log(number)

# Show log number
print(log_number)

# Take antilog
x <- exp(log_number)

# Print antilog value
print(x)

Output:

[1] 0.6931472

[1] 2

Here the output shows log and antilog values for number 3 which calculated using exp() function.

You can calculate the antilog value with any base value.

# Declare number
number = 8

# Take log number
log_number <- log(number,5)

# Show log number
print(log_number)

# Take antilog
x <- 5^log_number

# Print antilog value
print(x)

Output:

[1] 1.29203

[1] 8

Here the output shows log and antilog value for number 8 with base 5.