plot_question | R Documentation |
Using ggplot2, generate a plot object that will display a histogram of the responses to single survey item.
plot_question(d, question, labels = NULL, ymax = 1200)
d |
A data frame containing the source data |
question |
Which column in |
labels |
an optional list of labels for the question. This is usually the list of question options from the survey |
ymax |
The maximum y value (ylim) for the plot. This is used to ensure that a set of plots are comparable. |
A ggplot2 plot object containing a histogram
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.