Radian measure in sin in R?
r, trigonometry
Solution
it works
1 degree =0.0174532925 radians
sin(52.517*0.0174532925)
[1] 0.7935339
EDIT
refered from here
degrees.to.radians<-function(degrees=45,minutes=30)
{
if(!is.numeric(minutes)) stop("Please enter a numeric value for minutes!\n")
if(!is.numeric(degrees)) stop("Please enter a numeric value for degrees!\n")
decimal<-minutes/60
c.num<-degrees+decimal
radians<-c.num*pi/180
radians
}
sin(degrees.to.radians(52.517,0))
[1] 0.7935339
Problem
I want to calculate the following in R: sin(52.517°) and this should be equal to 0.79353. But when I code ``` sin(52.517) ``` I get ``` 0.777119 ``` So how can I get the 0.79353. I am not good in math, but I know something is not working with degrees and the radian measure here in R.