Learn R Programming

BClustLonG (version 0.1.3)

calSim: Function to calculate the similarity matrix based on the cluster membership indicator of each iteration.

Description

Function to calculate the similarity matrix based on the cluster membership indicator of each iteration.

Usage

calSim(mat)

Arguments

mat

Matrix of cluster membership indicator from all iterations

Examples

Run this code
# NOT RUN {
n = 90 ##number of subjects
iters = 200 ##number of iterations
## matrix of cluster membership indicators
## perfect clustering with three clusters
mat = matrix(rep(1:3,each=n/3),nrow=n,ncol=iters)
sim = calSim(t(mat))
# }

Run the code above in your browser using DataLab