vector_angle | R Documentation |
Compute the angle of a vector
vector_angle(x, origin = c(0, 0), degrees = FALSE, allow_negative = FALSE)
x |
A length-2 vector |
origin |
A length-2 vector |
degrees |
If TRUE, returns angles in degrees instead of radians |
allow_negative |
If TRUE, returns angles between -pi and pi (-180 and +180. If FALSE, returns angles between 0 and 2 * pi (0 and 360) |
A length-1 vector
vector_angle(c(1,1))
vector_angle(c(1,1), degrees = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.