ci_heatmap | R Documentation |
When conducting cognitive interviews, it can be useful to quickly inspect the code distributions for each item. These heatmaps facilitate that process.
ci_heatmap( x, nrmSpec = NULL, language = nrmSpec$defaultLanguage, wrapLabels = 80, itemOrder = NULL, itemLabels = NULL, itemIdentifier = "uiid", codingScheme = "peterson", itemlab = NULL, codelab = NULL, freqlab = "Count", plotTitle = "Cognitive Interview Heatmap", fillScale = ggplot2::scale_fill_viridis_c(), theme = ggplot2::theme_minimal() )
x |
The object with the parsed coded source(s) as resulting from a
call to |
nrmSpec |
Optionally, an imported Narrative Response Model
specification, as imported with |
language |
If |
wrapLabels |
Whether to wrap the labels; if not |
itemOrder, itemLabels |
Instead of specifying an NRM specification,
you can also directly specify the item order and item labels. |
itemIdentifier |
The column identifying the items; the class instance
identifier prefix, e.g. if item identifiers are specified as
|
codingScheme |
The coding scheme, either as a string if it represents
one of the cognitive interviewig coding schemes provided with the |
itemlab, codelab, freqlab |
Labels to use for the item and code axes
and for the frequency color legend ( |
plotTitle |
The title to use for the plot |
fillScale |
Convenient way to specify the fill scale (the colours) |
theme |
Convenient way to specify the |
The heatmap as a ggplot2 plot.
examplePath <- file.path(system.file(package="rock"), 'extdata'); parsedCI <- rock::parse_source( file.path(examplePath, "ci_example_1.rock") ); rock::ci_heatmap(parsedCI, codingScheme = "peterson");
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.