dataDef <- dataDemo
bust <- dataDef$bust
bustCirc_4 <- seq(74,102,4) ; bustCirc_6 <- seq(107,131,6) ; bustCirc <- c(bustCirc_4,bustCirc_6)
nsizes <- length(bustCirc)
maxsplit <- 5 ; orness <- 0.7
ahVect <- c(23,28,20,25,25)
hip <- list()
for(i in 1 : (nsizes-1)){
data = dataDef[(bust >= bustCirc[i]) & (bust < bustCirc[i + 1]), ]
d <- as.matrix(data)
hip[[i]] <- hipamAnthropom(d,maxsplit=maxsplit,orness=orness,type="MO",ahVect=ahVect)
}
#Medoids of the clusters with more than two elements for the second bust class:
hipamBigGroups(2,hip)
#Medoids of the clusters with more than two elements for all the bust classes:
list.meds <- lapply(1:(nsizes-1),FUN=hipamBigGroups,hip)
Run the code above in your browser using DataLab