Learn R Programming

OpenRepGrid (version 0.1.12)

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 calulated 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

Run this code
# NOT RUN {
   calcAngles(matrix(rnorm(9), 3))
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab