Learn R Programming

kmed (version 0.1.0)

cooccur: Co-occurrence distance for binary/ categorical variables data.

Description

This function computes and returns the distance matrix computed by co-occurence distance.

Usage

cooccur(data)

Arguments

data

A matrix or data frame of binary/ categorical variables. The values of matrix are integer, i.e 1, 2, 3, ....

Value

A matrix of distance from binary/ categorical variable.

Details

This is a function to compute a co-occurence distance. It returns a matrix of distance objects , i.e n x n.

References

Harikumar, S., PV, S., 2015. K-medoid clustering for heterogeneous data sets. JProcedia Computer Science 70, 226-237.

Examples

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


# }

Run the code above in your browser using DataLab