textAnnotatoR: Interactive Text Annotation Tool for R

Overview

textAnnotatoR provides an interactive graphical user interface for qualitative text analysis in R. The package allows researchers, students, and practitioners to annotate text, manage codes, create memos, and visualize coding patterns through an intuitive Shiny interface.

Key Features

Installation

# Install from CRAN
install.packages("textAnnotatoR")

# Or install the development version from GitHub
# install.packages("devtools")
# devtools::install_github("chaoliu-cl/textAnnotatoR")
install.packages("textAnnotatoR", repos = c('https://chaoliu-cl.r-universe.dev', 'https://cloud.r-project.org'))

Getting Started

Launch the annotation interface with a simple function call:

library(textAnnotatoR)
annotate_gui()

This opens the Shiny application in your default web browser. The interface includes a toolbar for project management, a tabbed main area for different functions, and a text display area.

Basic Usage

  1. Create a New Project: Click “New Project” in the top toolbar
  2. Import Text: Go to the “File” tab, upload your text document (.txt, .docx, .pdf)
  3. Annotate Text: Select text segments and apply codes
  4. Organize Codes: Create a hierarchical structure of themes and codes
  5. Analyze Patterns: Use the analysis tools to explore your coding
  6. Export Results: Save your annotations and analysis for further use

Documentation

Comprehensive documentation is available through vignettes:

# List available vignettes
vignette(package = "textAnnotatoR")

# Read specific vignettes
vignette("practical_example", package = "textAnnotatoR")
vignette("technical_integration", package = "textAnnotatoR")

Advanced Features

Code Hierarchies

Create and manage hierarchical code structures with themes and subthemes:

Co-occurrence Analysis

Explore relationships between different codes:

Comparison Tools

Compare coding patterns between different coders or documents:

Data Export

Export your annotations in various formats:

Integration with R Ecosystem

textAnnotatoR is designed to work seamlessly with other R packages:

System Requirements

Testing

The package includes comprehensive automated tests for core functionality, data processing, and utility functions. While testing interactive Shiny components presents unique challenges, the package maintains good test coverage for the underlying logic and data manipulation functions that power the user interface. Interactive components are validated through manual testing and user feedback.

Contributing

Contributions to textAnnotatoR are welcome! Please feel free to submit issues or pull requests on GitHub.

License

This package is licensed under the GPL-3 License.

Contact