generate_code_co_occurrence_analysis: Generate code co-occurrence statistics and visualization

View source: R/annotate_gui.R

generate_code_co_occurrence_analysisR Documentation

Generate code co-occurrence statistics and visualization

Description

Performs a comprehensive analysis of code co-occurrences in the text, including calculation of various similarity metrics and generation of network and heatmap visualizations.

Usage

generate_code_co_occurrence_analysis(annotations)

Arguments

annotations

Data frame containing text annotations with columns:

  • start: numeric, starting position of annotation

  • end: numeric, ending position of annotation

  • code: character, code applied to the annotation

Value

List containing:

  • co_occurrence: Matrix of raw co-occurrence counts

  • jaccard_similarity: Matrix of Jaccard similarity coefficients

  • phi_coefficient: Matrix of Phi coefficients

  • network_plot: Network visualization of code relationships

  • heatmap_plot: Heatmap visualization of code co-occurrences

  • summary: List of summary statistics


textAnnotatoR documentation built on April 3, 2025, 7:35 p.m.