Description Usage Arguments Value Examples
View source: R/likert_labelled.R
The main function for the precisionlikert
package.
1 2 3 | likert_labelled(ds, mid_level, ranked_levels, group,
label_minimum = 0.05, group_arrange = "positive",
cat_neutral = TRUE)
|
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 |
None
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.