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

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:

filter_none

edit
close

play_arrow

link
brightness_4
code

# 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)

chevron_right


Output:

[1] -0.7853982
[1] 0.4636476

Example 2:

filter_none

edit
close

play_arrow

link
brightness_4
code

# 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)

chevron_right


Output:

[1] 0.2209213
[1] 0.4284381
My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

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.


Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.