Skip to content
Related Articles

Related Articles

Improve Article
Convert Radian value to Degree value in R Programming – rad2deg() Function
  • Last Updated : 01 Jun, 2020

rad2deg() function in R Language is used to convert the specified radian value to degree value.

Note: This function requires ‘grid’ package to be installed.

Syntax: rad2deg(x)

Parameter:
x: radian value to be converted

Example 1:






# R code to convert radian value 
# to degree value
  
# Loading grid package
library(REdaS)
  
# Calling rad2deg() Function
rad2deg(pi)
rad2deg(3.14)
rad2deg(22 / 7)

Output:

Loading required package: grid
[1] 180
[1] 179.9087
[1] 180.0724

Example 2:




# R code to convert radian value 
# to degree value
  
# Loading grid package
library(REdaS)
  
# Calling rad2deg() Function
rad2deg(2 * pi)
rad2deg(-22 / 7)

Output:

Loading required package: grid
[1] 360
[1] -180.0724
My Personal Notes arrow_drop_up
Recommended Articles
Page :