calcAngles: Calculate angles for points in first two columns.

View source: R/calc.r

calcAnglesR Documentation

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)

Arguments

x

A matrix.

dim

Dimensions used for calculating angles.

clockwise

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

Value

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

Examples

## Not run: 

   calcAngles(matrix(rnorm(9), 3))

## End(Not run)


OpenRepGrid documentation built on May 31, 2023, 5:33 p.m.