Open In App

Compute the tangent value which is multiples of pi in R Programming – tanpi() Function

tanpi() function in R Language is used to compute the tangent value of x which is the multiples of pi.

Syntax: tanpi(x)



Parameters:
x: Numeric value, array or vector

Example 1:






# R program to illustrate 
# tanpi function 
    
# Calling the tanpi() function 
tanpi(0
tanpi(1 / 4

Output:

[1] 0
[1] 1

Example 2:




# R program to illustrate 
# tanpi function 
    
# Calling the tanpi() function 
tanpi(2 / 3
tanpi(1 / 2

Output:

[1] -1.732051
[1] NaN
Article Tags :