freq.supp.fn: freq.supp.fn: This function reads a 3-variable input data...

View source: R/agree.coeff2.r

freq.supp.fnR Documentation

freq.supp.fn: This function reads a 3-variable input data file containing unique pairs of categories along with their frequency of occurrences, and outputs a similar file where all possible pairs of categories are represented, some with a frequency of occurrence of 0.

Description

freq.supp.fn: This function reads a 3-variable input data file containing unique pairs of categories along with their frequency of occurrences, and outputs a similar file where all possible pairs of categories are represented, some with a frequency of occurrence of 0.

Usage

freq.supp.fn(freq.data, categories.vec)

Arguments

freq.data

The input data file containing all unique combinations of reported categories.

categories.vec

A vector containing the complete set of categories available to raters (e.g. "a", "b", "c", "d", "e"). The raters will not necessarily use all of these categories.

Value

This function returns a complete data frame containing all possible combinations of of categories in the categories.vec vector. Newly-added combinations of categories will have a frequency occurrence of 0.

Examples

#The dataset "freqs.data" comes with this package. Analyze it as follows:
freq.supp.fn(freqs.data) 
#Executing this command will yield the following data frame:
#  Ben   Gerry n
# <chr> <chr> <chr>
#   a     b     1    
#   a     d     1
#   b     b     2    
#   c     c     3    
#   d     b     1    
#   d     d     1    
#   e     e     1    
#   a     a     0

irrCAC documentation built on April 27, 2026, 9:08 a.m.