plot_likert: Plot likert graph

Description Usage Arguments Value

View source: R/plot.R

Description

Produce likert stacked bar chart (plotly). At least 2 questions per plot.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
plot_likert(
  table,
  mid,
  xlab,
  ylab,
  n,
  max_lines = 2,
  font_size = 12,
  neutral_mid = TRUE,
  break_q_names_col = NULL,
  ...
)

Arguments

table

Frequency table for likert quesitons (data frame). 4+ columns - question names in column 1 with answer options in subsequent columns. Frequencies should proportions, between 0 and 1.

mid

the mid-point of the scale. should be higher than 2 and lower than the number of answers.

xlab

X axis title

ylab

Y axis title

n

sample size

max_lines

changes maximum lines text can go over

font_size

minimum font size for the plot (numeric).

neutral_mid

whether the middle of the scale should be a neutral category (logical). TRUE by default

break_q_names_col

applies break_q_names to the column. Not applied by default

...

additional plot_ly arguments

Value

bar chart


best-practice-and-impact/CARS2 documentation built on Dec. 19, 2021, 8:47 a.m.