
Summarize Code Counts by Coder and from Preferred Coders
summarize_codes.Rd
This function summarizes how many times each code was applied by each coder, and presents the data in a wide format: one row per code, one column per coder, along with two total count columns:
Total count from all coders (regardless of preference)
Total count from preferred coders only (one coder per media title, selected in order of preference)
Usage
summarize_codes(
excerpts,
preferred_coders,
output_type = c("tibble", "kable", "datatable")
)
Arguments
- excerpts
A data frame of coded excerpts, typically read from an Excel file. Must include a column
Excerpt Creator
indicating who coded each excerpt, a columnMedia Title
identifying the transcript, and columns prefixed withCode:
for each code (binary indicators).- preferred_coders
A character vector of coder names in preferred order, used to resolve duplicates when multiple coders coded the same transcript.
- output_type
A string indicating the output format: one of
"tibble"
,"kable"
, or"datatable"
. Defaults to"tibble"
.