distance.mapping: Euclidean distance mapping

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/GeometricMappings.R

Description

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

Usage

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

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 euclidean distance will be calculated.

Details

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

Value

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

Author(s)

Thomas Grundy

See Also

geomcp

Examples

1
2
3
4
X <- rbind(matrix(rnorm(100*50,2),ncol=50),matrix(rnorm(100*50,2.5),ncol=50))
ref.vec.value <- rep(1,50)
ans <- distance.mapping(X,ref.vec.value)
ans

changepoint.geo documentation built on April 14, 2020, 7:16 p.m.