Learn R Programming

circular (version 0.5-1)

coord2rad: Angles between a vector and the x-axis

Description

From coordinates of the end point of a vector in 2 dimensions to the angle between this vector and the x-axis

Usage

coord2rad(x, y = NULL, control.circular = list())

Value

an object of class circular

Arguments

x

a matrix or a data.frame with two columns if y is NULL otherwise a vector.

y

a vector.

control.circular

the attribute of the resulting object.

Author

Claudio Agostinelli and Frederick T. Wehrle

See Also

circular

Examples

Run this code
set.seed(1234)
x <- cbind(rnorm(20), rnorm(20))
y <- coord2rad(x)

Run the code above in your browser using DataLab