#' gen_cutmat function
#'
#' This function creates a matrix of values, where the ith column represents which observations belong in which clusters given you have i clusters.
#'
#' This is one of a few functions created by Joe Cauteruccio, Jessie Li, Andrew West of Yale University that are used together to create the hclust_eval() function.
#' @param clus_out The result of applying hclust() to your data.
#' @param mdim The number of observations in your original data; this is also the maximum number of clusters that can be made with your data.
#'
#'@keywords gen_cutmat
#'@export
gen_cutmat <- function(clus_out, mdim) {
cut_mat <- matrix(nrow = mdim, ncol = mdim)
for (i in mdim:1){
cut_mat[, i] <- cutree(clus_out,k=i)
}
return(cut_mat)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.