Skip to contents

Plot Code Co-occurrence Heatmap

Usage

coccur(file_path, sheet = 1, min_frequency = 5, code_labels = NULL)

Arguments

file_path

String path to Excel file containing co-occurrence matrix.

sheet

Integer or string specifying sheet number or name (default: 1).

min_frequency

Numeric; minimum frequency threshold to display in heatmap (default: 5).

code_labels

Optional named vector or data.frame for mapping codes to readable labels.

  • If named vector: names are original codes, values are labels.

  • If data.frame: must have columns 'Code' and 'Label'.

Value

A ggplot2 heatmap object visualizing code co-occurrences above the threshold.