# example 1
data(garlicdist)
(garlic <- tocher(garlicdist))
garlic$distClust # cluster distances
# example 2
data(USArrests)
(usa <- tocher(dist(USArrests)))
usa$distClust
# cophenetic correlation
cophUS <- cophenetic(usa)
cor(cophUS, dist(USArrests))
# using the sequential algorithm
(usa2 <- tocher(dist(USArrests), algorithm = "sequential"))
usa2$criterion
# example 3
data(eurodist)
(euro <- tocher(eurodist))
euro$distClust
# End (not run)
Run the code above in your browser using DataLab