## continue the example from join()
example(join)
## fit the MAT model using the squared chord distance measure
swap.mat <- mat(swapdiat, swappH, method = "SQchord")
## fit the ROC curve to the SWAP diatom data using the MAT results
## Generate a grouping for the SWAP lakes
clust <- hclust(as.dist(swap.mat$Dij), method = "ward")
grps <- cutree(clust, 12)
## fit the ROC curve
swap.roc <- roc(swap.mat, groups = grps)
swap.roc
Run the code above in your browser using DataLab