Skip to contents

Alluvial plot of patients across cluster counts and important features

Usage

alluvial_cluster_plot(
  cluster_sequence,
  similarity_matrix,
  data_list = NULL,
  data = NULL,
  key_outcome,
  key_label = key_outcome,
  extra_outcomes = NULL,
  title = NULL
)

Arguments

cluster_sequence

A list of clustering algorithms (typically, the same algorithm varied over different numbers of clusters).

similarity_matrix

A similarity matrix.

data_list

A nested list of input data from generate_data_list().

data

A dataframe that contains features to include in the plot.

key_outcome

The name of the feature that determines how each patient stream is coloured in the alluvial plot.

key_label

Name of key outcome to be used for the plot legend.

extra_outcomes

Names of additional features to add to the plot.

title

Title of the plot.

Value

An alluvial plot (class "gg" and "ggplot") showing distribution of a feature across varying number cluster solutions.