Learn R Programming

kmed (version 0.1.0)

matching: A pair distance for binary/ categorical variables.

Description

This function computes and returns the distance matrix computed by using the simple matrching distance.

Usage

matching(x, y)

Arguments

x

A data frame/ matrix.

y

A second data frame/ matrix.

Details

This is a function to compute simple matching distance. It returns a matrix of distance objects, i.e n x n.

Examples

Run this code
# NOT RUN {
set.seed(1)
a <- matrix(sample(1:2, 7*3, replace = TRUE), 7, 3)
matching(a, a)

# }

Run the code above in your browser using DataLab