calculate_co_occurrences {textAnnotatoR} | R Documentation |
Calculate code co-occurrences in annotations
Description
Analyzes text annotations to identify and count instances where different codes overlap or co-occur in the same text regions. Handles edge cases and provides error-safe operation.
Usage
calculate_co_occurrences(annotations)
Arguments
annotations |
Data frame containing annotations with columns:
|
Details
Co-occurrences are identified by finding overlapping text regions between different code annotations. The function sorts annotations by position and checks for overlaps between each pair of annotations.
Value
Table object containing frequencies of code pairs that co-occur, with code pair names as "code1 & code2"
[Package textAnnotatoR version 0.1.4 Index]