dist-matrix: Distance Matrix Computation from Two Matrices

Description Usage Arguments Details Value Examples

Description

This function extends dist to accept two arguments.

Usage

1
distR(x1, x2 = NULL)

Arguments

x1

matrix of size N1 x n

x2

matrix of size N2 x n

Details

Computes the distances between the coordinates in x1 and the coordinates in x2. The matrices x1 and x2 do not need to have the same number of rows, but need to have the same number of columns (dimensions).

Value

Matrix of size N1 x N2

Examples

1
2
A <- matrix(rnorm(50),5,10)
D <- distR(A,A[-3,])

Example output



FRK documentation built on May 2, 2019, 8:11 a.m.