Learn R Programming

OpenRepGrid (version 0.1.16)

calcAngles: Calculate angles for points in first two columns.

Description

The angles of the points given by the values in the first and second column of a matrix seen from the origin are calculated in degrees.

Usage

calcAngles(x, dim = c(1, 2), clockwise = TRUE)

Value

vector. The angles of each row point with the origin as reference.

Arguments

x

A matrix.

dim

Dimensions used for calculating angles.

clockwise

Logical. Positive angles are clockwise with x axis as basis.

Examples

Run this code
if (FALSE) {
m <- matrix(rnorm(9), 3)
calcAngles()
}

Run the code above in your browser using DataLab