Trigonometric Functions

DESCRIPTION:
Returns the sine, cosine or tangent transformation of a numeric or complex valued object.

USAGE:
cos(x)
sin(x)
tan(x)

REQUIRED ARGUMENTS:
x:
numeric (in radians), or complex object. Missing values (NAs) are allowed.

VALUE:
data with each element transformed by the specified trigonometric function, with attributes preserved.

CLASSES:
This function will be used as the default method for classes that do not inherit a specifc method for the function or for the Math group of functions. The result will retain the class and the attributes. If this behavior is not appropriate, the designer of the class should provide a method for the function or for the Math group.

DETAILS:
Missing values in the input create missing values in the output.

These are members of the Math group of generic functions.

See section 5.1.5 of Becker, Chambers and Wilks for details on domains and branch cuts in the case of complex arguments.


SEE ALSO:
acos for inverse trigonometric functions, cosh for hyberbolic functions.

EXAMPLES:
my.matrix <- matrix(seq(1, 2*pi, len=12, nrow=4)
cos(my.matrix) # will be a matrix of the same dimensions

1/sin(x) # cosecant of x 1/tan(x) # cotangent of x