R/get_clusters.R

Defines functions get_clusters

Documented in get_clusters

#' Extract cluster labels
#'
#' @export
#' @param hc A protoshiny object downloaded from the web interface.
#' @return A vector of saved cluster assignments resulting from interaction in the protoshiny application.
get_clusters <- function(hc) {
  if(!("protoshiny" %in% class(hc))) stop("Please pass in a saved protoshiny object.")
  hc$protoshiny$clusters
}

Try the protoshiny package in your browser

Any scripts or data that you put into this service are public.

protoshiny documentation built on May 18, 2022, 5:13 p.m.