Learn R Programming

changepoint.geo (version 1.0.2)

angle.mapping: Principle angle mapping

Description

Calculates the principle angle of each time vector to the reference vector. Note data points are not translated in this function and error checking is not performed!

Usage

angle.mapping(X,ref.vec.value=rep(1,length(X[1,])))

Value

A vector of length n is returned with the angle mapping for each time point.

Arguments

X

A matrix containing the centralized data of size n by p.

ref.vec.value

A vector containing the reference vector from which the principle angle will be calculated.

Author

Thomas Grundy

Details

This function calculates the principle angle between each time vector and the reference vector. Note the translation within geomcp happens outside of the function.

See Also

geomcp

Examples

Run this code
X <- rbind(matrix(rnorm(100*50,2),ncol=50),matrix(rnorm(100*50,2,4),ncol=50))
ref.vec.value <- rep(1,50)
ans <- angle.mapping(X,ref.vec.value)
ans

Run the code above in your browser using DataLab