#' Clustering Variables
#'
#' @param data Data set.
#'
#' @return Clustered variables.
#' @export
varClusters <- function(data) {
p <- ncol(data)
n <- nrow(data)
kc <- floor(2 * (n - 2) / 3)
tree <- ClustOfVar::hclustvar(data)
index <- 2
cuts <- ClustOfVar::cutreevar(tree, k = index)
cuts
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.