trigonometric-functions {affiner} | R Documentation |
Angle vector aware trigonometric functions
Description
sine()
, cosine()
, tangent()
, secant()
, cosecant()
, and cotangent()
are
angle()
aware trigonometric functions that allow for a user chosen angular unit.
Usage
sine(x, unit = getOption("affiner_angular_unit", "degrees"))
cosine(x, unit = getOption("affiner_angular_unit", "degrees"))
tangent(x, unit = getOption("affiner_angular_unit", "degrees"))
secant(x, unit = getOption("affiner_angular_unit", "degrees"))
cosecant(x, unit = getOption("affiner_angular_unit", "degrees"))
cotangent(x, unit = getOption("affiner_angular_unit", "degrees"))
Arguments
x |
An angle vector or an object to convert to it (such as a numeric vector) |
unit |
A string of the desired angular unit. Supports the following strings
(note we ignore any punctuation and space characters as well as any trailing
|
Value
A numeric vector
Examples
sine(pi, "radians")
cosine(180, "degrees")
tangent(0.5, "turns")
a <- angle(0.5, "turns")
secant(a)
cosecant(a)
cotangent(a)
[Package affiner version 0.1.3 Index]