tan()
function in R Language is used to calculate the tangent of the numeric value passed to it as argument.
Syntax: tan(x)
Parameter:
x: Numeric value
Example 1:
x1 < - - 90
x2 < - - 30
tan(x1)
tan(x2)
|
Output:
[1] 1.9952
[1] 6.405331
Example 2:
x1 < - pi
x2 < - pi / 3
tan(x1)
tan(x2)
|
Output:
[1] -1.224647e-16
[1] 1.732051