Learn R Programming

kmed (version 0.0.1)

distNumeric: A pair distance for continuous variables.

Description

This function computes and returns the distance matrix computed by using the specified distance measure to compute the pairwise distances between the rows of two data of numerical variables.

Usage

distNumeric(x, y, method = "mrw")

Arguments

x

A data matrix.

y

A second data matrix.

method

A distance for numerical variables.

Details

This is a two-data-set to compute distance. It returns a matrix of all pairwise distances between rows in x and y. The available distance are Manhattan weighted by rank ("mrw"), Squared Euclidean weighted by variance ("sev"), Squared Euclidean weighted by rank ("ser"), and Squared Euclidean ("se").

Examples

Run this code
# NOT RUN {
num <- as.matrix(iris[,1:4])
mrwdist <- distNumeric(num, num, method = "mrw")
mrwdist[1:6,1:6]

# }

Run the code above in your browser using DataLab