cluster_group_plot: Saves to file a plot of the clusters within a cluster group

cluster_group_plotR Documentation

Saves to file a plot of the clusters within a cluster group

Description

Saves to file a plot showing the clusters within a cluster group, colored by group membership and with the central elements labeled for each cluster

Usage

cluster_group_plot(
  scores_df,
  cluster_membership,
  central_elements_by_cluster,
  cluster_group_id,
  output_path = NA,
  my_width = 8,
  my_height = 8
)

Arguments

scores_df

Dataframe with elements ( i.e. features ) x principle component scores. Expects at least a PC1 and PC2 column

cluster_membership

Integer factor with cluster membership for each element in scores_df

central_elements_by_cluster

Character vector with element names at locations of most central elements for each cluster and "" everywhere else

cluster_group_id

One-length character vector name for this cluster group to be used in plot title

output_path

Character vector with fully qualified path to which plot will be saved

my_width

One-length numeric vector with width of output plot ( in inches )

my_height

One-length numeric vector with height of output plot ( in inches )

Value

Returns the ggplot object


Benjamin-Vincent-Lab/binfotron documentation built on Oct. 1, 2024, 8:33 p.m.