Convert Degree value to Radian value in R Programming – deg2rad() Function
deg2rad()
function in R Language is used to convert the specified degree value to radian value.
Note: This function requires ‘grid’ package to be installed.
Syntax: deg2rad(x)
Parameter:
x: degree value to be converted
Example 1:
library(REdaS)
deg2rad( 0 )
deg2rad( 30 )
deg2rad( 50 )
|
Output:
Loading required package: grid
[1] 0
[1] 0.5235988
[1] 0.8726646
Example 2:
library(REdaS)
deg2rad( 60 )
deg2rad( 180 )
deg2rad( - 60 )
|
Output:
Loading required package: grid
[1] 1.047198
[1] 3.141593
[1] -1.047198
Last Updated :
01 Jun, 2020
Like Article
Save Article
Share your thoughts in the comments
Please Login to comment...