This help topic is for R version 2.9.0. For the current version of R, try https://stat.ethz.ch/R-manual/R-patched/library/base/html/Trig.html
Trig {base}R Documentation

Trigonometric Functions

Description

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.

Usage

cos(x)
sin(x)
tan(x)
acos(x)
asin(x)
atan(x)
atan2(y, x)

Arguments

x, y

numeric or complex vectors.

Details

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

All except atan2 are generic functions: methods can be defined for them individually or via the Math group generic.

Complex values

For the inverse trigonometric functions, branch cuts are defined as in Abramowitz and Stegun, figure 4.4, page 79. Continuity on the branch cuts is standard.

For asin() and acos(), there are two cuts, both along the real axis: \left(-\infty, -1\right] and \left[1, \infty\right). Functions asin() and acos() are continuous from above on the interval \left(-\infty, -1\right] and continuous from below on \left[1, \infty\right).

For atan() there are two cuts, both along the pure imaginary axis: \left(-\infty i, -1i\right] and \left[1i, \infty i\right). It is continuous from the left on the interval \left(-\infty i, -1i\right] and from the right on the interval \left[1i, \infty i\right).

S4 methods

All except atan2 are S4 generic functions: methods can be defined for them individually or via the Math group generic.

References

Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988) The New S Language. Wadsworth & Brooks/Cole.

Abramowitz, M. and Stegun, I. A. (1972). Handbook of Mathematical Functions, New York: Dover.
Chapter 4. Elementary Transcendental Functions: Logarithmic, Exponential, Circular and Hyperbolic Functions


[Package base version 2.9.0 ]