trigonometric-functions | R Documentation |
sine()
, cosine()
, tangent()
, secant()
, cosecant()
, and cotangent()
are
angle()
aware trigonometric functions that allow for a user chosen angular unit.
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"))
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
|
A numeric vector
sine(pi, "radians")
cosine(180, "degrees")
tangent(0.5, "turns")
a <- angle(0.5, "turns")
secant(a)
cosecant(a)
cotangent(a)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.