# NOT RUN {
library(metan)
library(dplyr)
# Compute the mean for genotypes
means <- means_by(data_ge, GEN) %>%
column_to_rownames("GEN")
# Compute the covariance matrix
covmat <- cov(means)
# Compute the distance
dist <- mahala(means, covmat)
# Dendrogram
dend <- dist %>%
as.dist() %>%
hclust() %>%
as.dendrogram()
plot(dend)
# }
Run the code above in your browser using DataLab