R: Angles between a vector and the x-axis

coord2rad {circular} | R Documentation

## 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())

### 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.

### Value

an object of class `circular`

### Author(s)

Claudio Agostinelli and Frederick T. Wehrle

### See Also

`circular`

### Examples

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

[Package circular version 0.4-93 Index]