Trig {base} | R Documentation |
These functions give the obvious trigonometric functions. They respectively compute the cosine, sine, tangent, arc-cosine, arc-sine, arc-tangent, and the two-argument arc-tangent.
cos(x)
sin(x)
tan(x)
acos(x)
asin(x)
atan(x)
atan2(y, x)
x , y |
numeric vector |
The arc-tangent of two arguments atan2(y,x)
returns the angle
between the x-axis and the vector from the origin to (x,y)
, i.e., for
positive arguments atan2(y,x) == atan(y/x)
.
Angles are in radians, not degrees (i.e. a right angle is \pi/2
).
Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988) The New S Language. Wadsworth \& Brooks/Cole.