This function makes life simple by providing a VarClus.

get.vc.correlation.groups(dataset, metrics, similarity = "spearman",
  varclus.threshold = 0.7)

Arguments

dataset

a data frame for data

metrics

a vector of characters or a vector of characters for independent variables

similarity

a character for similarity measures (e.g., Spearman rank correlation), default = spearman

varclus.threshold

a numeric for correlation coefficient threshold value