freq.supp.fn | R 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.
freq.supp.fn(freq.data, categories.vec)
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. |
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.
#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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.