Compute the cosine value which is multiples of pi in R Programming - cospi() Function Last Updated : 08 Jun, 2020 Comments Improve Suggest changes Like Article Like Report cospi() function in R Language is used to compute the cosine value of x which is the multiples of pi. Syntax: cospi(x) Parameters: x: Numeric value, array or vector Example 1: Python3 # R program to illustrate # cospi function # Calling the cospi() function cospi(0) cospi(1) Output: [1] 1 [1] -1 Example 2: Python3 # R program to illustrate # cospi function # Calling the cospi() function cospi(1 / 4) cospi(2 / 5) cospi(3 / 7) Output: [1] 0.7071068 [1] 0.309017 [1] 0.2225209 Comment More infoAdvertise with us Next Article Compute the cosine value which is multiples of pi in R Programming - cospi() Function K Kanchan_Ray Follow Improve Article Tags : R Language R Math-Function Similar Reads 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: Python3 1== # R program to illustrate # sinpi function # Calling the sinpi() function sinpi(0.5) sinpi(1) Output: [1] 1 [1] 0 1 min read 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: Python3 1== # R program to illustrate # tanpi function # Calling the tanpi() function tanpi(0) tanpi(1 / 4) Output: [1] 0 [ 1 min read Calculate cosine of a value in R Programming - cos() Function cos() function in R Language is used to calculate the cosine value of the numeric value passed to it as argument. Syntax: cos(x) Parameter: x: Numeric value Example 1: Python3 1== # R code to calculate cosine of a value # Assigning values to variables x1 <- 90 x2 <- 30 # Using cos() Function c 1 min read Calculate Inverse cosine of a value in R Programming - acos() Function acos() function in R Language is used to calculate the inverse cosine value of the numeric value passed to it as argument. Syntax: acos(x) Parameter: x: Numeric value Example 1: Python3 1== # R code to calculate inverse cosine of a value # Assigning values to variables x1 <- -1 x2 <- 0.5 # Usi 1 min read Calculate arc cosine of a value in R programming - acos() function The acos() is an inbuilt function in R Programming which is used to calculate arc cosine of the specified radian value and output is also in radians. Syntax: acos(radian) Return: Returns the arc cosine value of radian. Example 1: Python3 # Using acos() method gfg <- acos(pi/4) print(gfg) Output: 1 min read Like