# NOT RUN {
# Example of multivariate analysis using built-in iris dataset
data(iris)
iris.md <- distance(iris[,1:4], "mahal")
# Create a model matrix for testing species differences
iris.model <- distance(as.numeric(iris[,5]), "eucl")
iris.model[iris.model > 0] <- 1
# Test whether samples within the same species are more similar than those not
mantel(iris.md ~ iris.model, nperm=10000)
# }
Run the code above in your browser using DataLab