Skip to contents

Detect if we have more than 3 questions with the same response options within the same questions group and represent the result using a standard likert plot - build from https://github.com/jbryer/likert

Usage

plot_likert(
  datalist = datalist,
  dico = dico,
  scopei,
  list_namei,
  repeatvari,
  datasource = NULL,
  showcode = FALSE
)

Arguments

datalist

An object of the "datalist" class as defined in kobocruncher

dico

An object of the "kobodico" class format as defined in kobocruncher

scopei

group in which the likert frame are

list_namei

name of the likert option list

repeatvari

name of the frame within the dataset where to look for the data

datasource

name of the data source to display, if set to NULL - then pulls the form_title within the settings of the xlsform

showcode

display the code

Examples

dicolikert <- kobo_dico( xlsformpath = system.file("form_likert.xlsx", package = "kobocruncher") )
datalistlikert <- kobo_data(datapath = system.file("data_likert.xlsx", package = "kobocruncher") )
#> Warning: Unknown or uninitialised column: `_index`.

plot_likert(datalist = datalistlikert,
            dico = dicolikert,
            datasource = NULL,
            scopei =  "group_ei8jz33",
            repeatvari =   "main",
            ## getting the list_name and corresponding label
            list_namei = "yk0td68" 
          )