Description Usage Arguments Examples
Graphs a horizontal stacked bar plot to display information from a series of questions that use the same options (e.g., a matrix).
1 2 |
items |
Data frame with only items to be graphed |
respopts |
Vector with the order (low to high) of response options, must be specified even if options are not ordinal |
labels |
Vector, in order of |
sort |
The order in which items should be displayed upon graphing.
Options include: |
mcmo |
Indicator for whether respondents could choose more than one option, default is FALSE |
ordered |
Specifies if the response options are ordered or not, if
ordered, palette is "YlOrRd", if unordered, palette is "Pastel1", can be
overridden with |
palette |
Sets custom palette for graphing, overrides defaults from
|
1 2 3 4 5 | # Graph agree/disagree questions
graph_matrix(survey[get_matchvars(survey, "Opinion_")],
respopts=c("Disagree", "Neutral", "Agree"),
labels=c("Apples", "Bananas", "Coconuts"),
sort="Agree")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.