calculate_transitions {textAnnotatoR} | R Documentation |
Calculate transitions between consecutive codes
Description
Analyzes the sequence of code applications to identify transitions between consecutive codes in the text. Creates a list of code pairs representing each transition from one code to another.
Usage
calculate_transitions(annotations)
Arguments
annotations |
Data frame containing annotations with columns:
|
Details
Transitions are identified by sorting annotations by position and then analyzing consecutive pairs of codes. The function handles edge cases and provides error-safe operation.
Value
List where each element is a named vector containing:
from: Character string of the source code
to: Character string of the target code
[Package textAnnotatoR version 0.1.4 Index]