Skip to contents

Constructs a ggplot2::ggplot2 barplot for Likert and Likert-like results with each option displayed as an individual, horizontal MSU dark-green bars. The percentage of responses are noted on the bar as white text.

This function is called by likert.plot.matrix() but can be called individually.

Usage

likert.barplot(data, QoI, value.range)

Arguments

data

tibble (or data.frame) with Likert data converted to integers. Use the convert.fromto() function to convert text responses to integers. Note: Ensure the integers are positive and non-zero.

QoI

string with the Question of Interest (the rows)

value.range

range of possible Likert values

Value

ggplot2 graphics object

Examples

if (FALSE) { # \dontrun{
likert.barplot(data=fs20.likert, QoI="Q1")
} # }