Open In App

Calculate sine of a value in R Programming - sin() Function

Last Updated : 01 Jun, 2020
Comments
Improve
Suggest changes
Like Article
Like
Report
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: Python3 1==
# R code to calculate sine of a value

# Assigning values to variables
x1 <- -90
x2 <- -30

# Using sin() Function
sin(x1)
sin(x2)
Output:
[1] -0.8939967
[1] 0.9880316
Example 2: Python3 1==
# R code to calculate sine of a value

# Assigning values to variables
x1 <- pi
x2 <- pi / 3

# Using sin() Function
sin(x1)
sin(x2)
Output:
[1] 1.224647e-16
[1] 0.8660254

Next Article
Article Tags :

Similar Reads