The Wayback Machine - https://web.archive.org/web/20240131223453/https://www.geeksforgeeks.org/calculate-inverse-tangent-of-a-value-in-r-programming-atan-function/
Open In App
Related Articles

Calculate Inverse tangent of a value in R Programming – atan() Function

Improve
Improve
Improve
Like Article
Like
Save Article
Save
Report issue
Report

atan() function in R Language is used to calculate the inverse tangent value of the numeric value passed to it as argument.

Syntax: atan(x)

Parameter:
x: Numeric value

Example 1:




# R code to calculate inverse tangent of a value
  
# Assigning values to variables
x1 <- -1
x2 <- 0.5
  
# Using atan() Function
atan(x1)
atan(x2)


Output:

[1] -0.7853982
[1] 0.4636476

Example 2:




# R code to calculate inverse tangent of a value
  
# Assigning values to variables 
x1 <- 0.224587
x2 <- 0.456732
  
# Using atan() Function
atan(x1)
atan(x2)


Output:

[1] 0.2209213
[1] 0.4284381

Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!

Looking for a place to share your ideas, learn, and connect? Our Community portal is just the spot! Come join us and see what all the buzz is about!


Last Updated : 01 Jun, 2020
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads