# NOT RUN {
library(metan)
# All rows and all numeric variables from data
d1 <- clustering(data_ge2)
# Based on the mean for each genotype
mean_gen <-
data_ge2 %>%
means_by(GEN) %>%
column_to_rownames("GEN")
d2 <- clustering(mean_gen)
# Select variables for compute the distances
d3 <- clustering(mean_gen, selvar = TRUE)
# Compute the distances with standardized data
# Define 4 clusters
d4 <- clustering(data_ge,
by = ENV,
scale = TRUE,
nclust = 4)
# }
Run the code above in your browser using DataLab