Related Articles

Related Articles

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:



filter_none

edit
close

play_arrow

link
brightness_4
code

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

chevron_right


Output:

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

Example 2:

filter_none

edit
close

play_arrow

link
brightness_4
code

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

chevron_right


Output:

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