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:
# R program to illustrate # cospi function # Calling the cospi() function cospi(0) cospi(1) |
chevron_right
filter_none
Output:
[1] 1 [1] -1
Example 2:
# R program to illustrate # cospi function # Calling the cospi() function cospi(1 / 4) cospi(2 / 5) cospi(3 / 7) |
chevron_right
filter_none
Output:
[1] 0.7071068 [1] 0.309017 [1] 0.2225209
Recommended Posts:
- Compute the sine value which is multiples of pi in R Programming – sinpi() Function
- Compute the tangent value which is multiples of pi in R Programming – tanpi() Function
- Calculate arc cosine of a value in R programming - acos() function
- Calculate cosine of a value in R Programming - cos() Function
- Calculate Hyperbolic cosine of a value in R Programming - cosh() Function
- Calculate Inverse cosine of a value in R Programming - acos() Function
- Compute the Natural Logarithm of the Absolute Value of Gamma Function in R Programming - lgamma() Function
- Compute the Second Derivative of the Logarithmic value of the gamma Function in R Programming - trigamma() Function
- Compute the value of Cauchy Quantile Function in R Programming - qcauchy() Function
- Compute value of Logistic Quantile Function in R Programming - qlogis() Function
- Compute value of Log Normal Quantile Function in R Programming - qlnorm() Function
- Compute the Value of Poisson Quantile Function in R Programming - qpois() Function
- Compute the Value of Negative Binomial Quantile Function in R Programming - qnbinom() Function
- Compute the Value of Empirical Cumulative Distribution Function in R Programming - ecdf() Function
- Compute the value of F Cumulative Distribution Function in R Programming - pf() Function
- Compute the value of Quantile Function over F Distribution in R Programming - qf() Function
- Compute the Value of Quantile Function over Weibull Distribution in R Programming - qweibull() Function
- Compute the value of Quantile Function over Studentized Distribution in R Programming - qtukey() Function
- Compute the value of Quantile Function over Wilcoxon Signedrank Distribution in R Programming - qsignrank() Function
- Compute the value of Quantile Function over Wilcoxon Rank Sum Distribution in R Programming – qwilcox() Function
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.

