Open In App

Calculate Inverse cosine of a value in R Programming - acos() Function

Last Updated : 01 Jun, 2020
Comments
Improve
Suggest changes
Like Article
Like
Report
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

# Using acos() Function
acos(x1)
acos(x2)
Output:
[1] 3.141593
[1] 1.047198
Example 2: Python3 1==
# R code to calculate inverse cosine of a value

# Assigning values to variables
x1 <- 0.224587
x2 <- 0.456732

# Using acos() Function
acos(x1)
acos(x2)
Output:
[1] 1.344277
[1] 1.096478

Next Article
Article Tags :

Similar Reads