R/CalculateWAll.R

Defines functions CalculateWAll

## calculate the distance between inner clusters, W
CalculateWAll <- function(x, n, kG)
{    
    W <- rep(1, kG)
     
    for (k in 2:kG)
    { 
        W[k] <- cluster::clara(x, k, samples=20, medoids.x=FALSE)$objective
    }

    W
}

Try the AssocTests package in your browser

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

AssocTests documentation built on Jan. 13, 2021, 5:09 a.m.