Skip to contents

Plotting Open Text variables

Usage

plot_text(
  datalist = datalist,
  dico = dico,
  var,
  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

var

name of the variable to display

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

dico <- kobo_dico( xlsformpath = system.file("sample_xlsform.xlsx", package = "kobocruncher") )
datalist <- kobo_data(datapath = system.file("data.xlsx", package = "kobocruncher") )

plot_text(datalist = datalist,
              dico = dico, 
              var = "profile.occupation",
              showcode = TRUE)
#> Warning: transformation drops documents
#> Warning: transformation drops documents
#> Warning: transformation drops documents
#> Warning: transformation drops documents
#> Warning: transformation drops documents
#> Warning: transformation drops documents
#> Warning: transformation drops documents
#> Warning: transformation drops documents
#> Warning: transformation drops documents
#> Warning: transformation drops documents
#> 
#> What's you occupation?
#>  `plot_text(datalist, dico, "profile.occupation", datasource=params$datasource)` 
#> 
#>