knn_elements {knnp}R Documentation

Creates a matrix to be used for calculating distances. The most recent 'element' is put in the first row of the matrix, the second most recent 'element' in the second row and so on. Therefore, the oldest 'element' is put in the last row.

Description

Creates a matrix to be used for calculating distances. The most recent 'element' is put in the first row of the matrix, the second most recent 'element' in the second row and so on. Therefore, the oldest 'element' is put in the last row.

Usage

knn_elements(y, d)

Arguments

y

A matrix.

d

Length of each of the 'elements'.

Value

A matrix to be used for calculating distances.


[Package knnp version 2.0.0 Index]