R/recluster.expl.R

Defines functions recluster.expl

Documented in recluster.expl

recluster.expl<-function(mat,clust){
mat<-as.matrix(mat)
beta <- sum(mat)
cluster <- NULL
betapartial <- 0
        for (row in 1:nrow(mat)) {
            for (col in 1:ncol(mat)) {
                if (clust[row] != clust[col]) {
                  betapartial <- betapartial + mat[row, col]
                }
            }
        }
return(betapartial/beta)
}

Try the recluster package in your browser

Any scripts or data that you put into this service are public.

recluster documentation built on July 27, 2020, 1:15 a.m.