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