Trusted answers to developer questions

Onyejiaku Theophilus Chidalu

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

The **log()**** function** in R is used to obtain the logarithm (the natural logarithm, by default) of a given input numeric or complex vector.

log(x, base)

Syntax for the log() function

The `log()`

function takes the following parameter values:

: This is the numeric or complex vector whose logarithm is to be obtained.**x**

: This is a positive or complex number that represents the base at which the logarithm of**base**`x`

is to be computed.

The `log(0)`

function returns the logarithmic value in the specified `base`

passed to it.

# creating a numeric vectorx = 100# taking the logarithm of x in base 2log(x, 2)# taking the logarithm of x in base 10log(x, 10)# taking the natural logarithm of xlog(x)

Implementing the log() function

RELATED TAGS

function

r

logarithm

communitycreator

CONTRIBUTOR

Onyejiaku Theophilus Chidalu

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

Keep Exploring

Related Courses