Learn R Programming

textAnnotatoR (version 1.0.1)

analyze_code_context: Analyze context around code applications

Description

Examines the surrounding context where codes are applied by looking at preceding and following annotations to understand code relationships.

Usage

analyze_code_context(code_anns, all_anns)

Value

List of contexts for each code instance:

  • before: Preceding annotation if exists

  • after: Following annotation if exists

Arguments

code_anns

Data frame containing annotations for specific code:

  • start: numeric, starting position

  • end: numeric, ending position

  • code: character, code identifier

all_anns

Data frame containing all annotations in the text