likert.heat.plot2 | R Documentation |
Heatmap representation summarizing categorical/likert data. Modified version of 'likert.heat.plot' from 'likert' package. Does not allow different categorical ranges across questions. The function outputs a ggplot object where additional layers can be added for customization purposes. The output plot preserves the question order given by columns of 'x'.
likert.heat.plot2(
x,
allLevels,
low.color = "white",
high.color = "blue",
text.color = "black",
text.size = 4,
textLen = 50
)
x |
matrix object or data.frame with categorical data. Columns are questions and rows are observations. |
allLevels |
vector with all categorical (ordered) levels. |
low.color |
string; name of color assigned to the first level found in 'allLevels'. |
high.color |
string; name of color assigned to the last level found in 'allLevels'. |
text.color |
string; text color of numbers within cells. |
text.size |
string; text size for numbers within cells. |
textLen |
string; maximum length of text-length for question labels (column names) |
ggplot object.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.