
Summarize Quality Indicator Counts by Code from Excerpts Data
quality_indicators.Rd
This function analyzes a data frame of coded excerpts to summarize counts of specified quality indicators by code. It filters excerpts to preferred coders per media title (if not already filtered), identifies excerpts where each quality indicator applies (logical TRUE), and returns a summary table counting how many excerpts for each code have each quality indicator applied.
Arguments
- excerpts
A data frame containing excerpt data with logical code columns. Code columns should use clean variable names without prefixes or suffixes (e.g.,
"Priority excerpt"
).- preferred_coders
A character vector specifying coders in order of preference. Used to filter excerpts to only those from the highest-ranked coder per media title.
- qual_indicators
A character vector of quality indicator code names to summarize. These should match the clean column names present in
excerpts
.
Value
A tibble grouped by Code
containing counts of excerpts where each quality indicator was applied.
Columns are named as "<quality_indicator>_Count"
.
The output is arranged in descending order by these counts.
Details
The function expects the
excerpts
data frame to have logical columns representing codes.It filters to preferred coders per media title to avoid duplicates.
It computes counts of excerpts for each code where each quality indicator was applied.
Input excerpts should be pre-cleaned with consistent code naming (e.g., using
clean_data()
).