likert_labelled: Produces likert plots with labels

Description Usage Arguments Value Examples

View source: R/likert_labelled.R

Description

The main function for the precisionlikert package.

Usage

1
2
3
likert_labelled(ds, mid_level, ranked_levels, group,
  label_minimum = 0.05, group_arrange = "positive",
  cat_neutral = TRUE)

Arguments

ds

a datafarme with groups as rows and levels as columns

ranked_levels

an ordered factor of all levels

group

a factor or character vector of all groups (y-axis of likert plot)

label_minimum

the proportion for which likert plot will be labelled

group_arrange

a character of positive (default) or negative

cat_neutral

default TRUE but if FALSE then there is no true neutral category; mid_level specifies where alignment will happen

mid_ldevel

the neutral or middle category

Value

None

Examples

1
2
3
4
5
data("country_outlook")
ranked_levels <- factor(x = c('Much.worse', 'Somewhat.worse', 'Almost.the.same', 'Somewhat.better', 'Much.better'), levels = c('Much.worse', 'Somewhat.worse', 'Almost.the.same', 'Somewhat.better', 'Much.better'))
mid_level <- 'Almost.the.same'
group <- "Country"
likert_labelled(ds, mid_level, ranked_levels, group)

precision-analytics/precisionlikert documentation built on Nov. 5, 2019, 1:13 a.m.