Open In App

Compute the sine value which is multiples of pi in R Programming – sinpi() Function

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

Syntax: sinpi(x)



Parameters:
x: Numeric value, array or vector

Example 1:






# R program to illustrate 
# sinpi function 
    
# Calling the sinpi() function 
sinpi(0.5
sinpi(1

Output:

[1] 1
[1] 0

Example 2:




# R program to illustrate 
# sinpi function 
    
# Calling the sinpi() function 
sinpi(1 / 4
sinpi(2 / 5

Output:

[1] 0.7071068
[1] 0.9510565
Article Tags :