plot_dist | R Documentation |
Plot distribution of Likert-scale type item
plot_dist( var, data, max_val = NULL, title = "", colorblind = F, density = T, binwidth = 0.5, return = F )
var |
Variable to plot |
data |
data.frame in which variable is contained |
max_val |
Maximum value of the item being analyzed (optional). If not supplied, the x axis will scale automatically. If supplied, the x axis will scale between 0 and max_val. |
title |
Title for the plot, optional |
colorblind |
Optional change of colors using the colorblind_1 palette from this package. |
density |
Whether density curve should be plotted. Helpful to deactivate for single-item analysis. |
binwidth |
Width of bins. Should be left at 0.5 for Likert-Scale items (aggregated) or set to 1 for single-item analysis. |
return |
If set to true, returns the plot instead of printing it. Use if you want to arrange multiple plots e.g. using 'ggarrange'. |
Plot of response pattern for the item
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.