plot_dist: Plot distribution of Likert-scale type item

View source: R/plot_dist.R

plot_distR Documentation

Plot distribution of Likert-scale type item

Description

Plot distribution of Likert-scale type item

Usage

plot_dist(
  var,
  data,
  max_val = NULL,
  title = "",
  colorblind = F,
  density = T,
  binwidth = 0.5,
  return = F
)

Arguments

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'.

Value

Plot of response pattern for the item


daaawit/ABOHiwi documentation built on March 23, 2022, 3:27 p.m.