Built-in Math Function in R

 

coverImage

Built-in Math Function in R

Built-in function in R | R built-in function | math function in R | math in R | built-in math function in R | how to use math built-in function in R programming language | How to perform common math operations in R programming language | how many built-in math functions in R

Hello friends,

Today we will discuss about the simple and common built-in functions of math present in R programming. By using these built-in functions you can easily perform the mathematical problems in easy way. Below we mentioned the table of built-in functions present in R.


Function

Sign

Description

Absolute

abs(x)

Take the absolute value of x

Logarithm(natural)

log(x)

Returns the natural logarithm of input x

Logarithm(Common)

log10(x)

Returns the common logarithm of input x

Exponential

exp(x)

Return exponent

Square root

sqrt(x)

Returns square root if input x

Factorial

factorial(x)

Returns factorial if input x

Ceiling

ceiling(x)

Returns smallest integer which is larger than or equal to x

Floor

floor(x)

Returns largest integer which is smaller than or equal to x

Truncate

trunc(x)

Returns truncate value of input x

Round

round(x, digits=n)

Returns roundoff value of input x

cos, sin, tan

cos(x), sin(x), tan(x)

Returns cos,sin,tan value of input x

signif

signif(x, digits=n)

Returns signif value of input x

max

max(x, y, z)

Returns highest value from x, y or z

min

min(z, y, z)

Returns lowest value from x, y or z

You can see the example of above functions in R terminal below.

BuiltinmathfunctioninR

Hope you understood the concept of built-in math function in R.

Read More:

Thank you



No comments:

Post a Comment

INSTAGRAM FEED

@soratemplates