analyze_code_combinations: Analyze combinations of code pairs

View source: R/annotate_gui.R

analyze_code_combinationsR Documentation

Analyze combinations of code pairs

Description

Analyzes the frequency of different code combinations by counting how often different pairs of codes appear together in overlapping annotations.

Usage

analyze_code_combinations(overlaps)

Arguments

overlaps

List of overlap information, where each element contains:

  • code1: character, identifier of first code

  • code2: character, identifier of second code

Details

The function processes overlapping code pairs and creates a frequency table of their combinations. Code pairs are sorted alphabetically before counting to ensure consistent ordering (e.g., "A-B" and "B-A" are counted as the same combination). Returns an empty list if no overlaps are provided.

Value

List containing:

  • frequencies: Table object containing counts of each code pair combination, where row names are formatted as "code1-code2" with codes sorted alphabetically


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