renderShinyLikert: Shiny likert

Description Usage Arguments Value Author(s) Examples

Description

Creates a list of rendered shiny outputs to be used in a shiny app or a "shiny-markdown" document

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
renderShinyLikert( data,
                   dropdown_factors = NULL,
                   questions = names( data$likert_data ),
                   height = NULL,
                   response_levels = levels( data$likert_data[ , 1 ] ),
                   split_factors = NULL,
                   group = NULL,
                   grouping = "likert",
                   id = toString( sample( 10^15, 1 ) ),
                   wrap = 30,
                   custom_tests = NULL,
                   ...
                 )

Arguments

data

an object of class likertData to be plotted

dropdown_factors

a character vector containing names of the factors which should be used for the dropdown menus

questions

the questions that should be displayed. (Currently broken)

height

minimum and maximum height of the plot in px. Setting this option will create a slider to control the height of the plot.

response_levels

answer possibilities to be plotted and tested

split_factors

factors to be used in the HH plot

group

variables to group the plot

grouping

decides wether the package HH or the package likert will be used to display the result. Only relevant if group has been set

id

a string definig the id of the output. The id has to be unique within your project

wrap

apply wraping for text on the y-Axis (factor levels).

custom_tests

a list containing tests to be applied in the table output

...

further arguments to be passed down to HH::likert

Value

A list of rendered shiny objects which can be used as outputs.

Author(s)

Gregor de Cillia

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## Not run: 
  library( shiny )
  shinyApp(
      ui= fluidPage(
          uiOutput( "selector" ),
          uiOutput( "plot" )
      ),
      server = function( input, output, session ){
          testData = createTestData()
          rendered = renderShinyLikert(
              testData,
              dropdown = "gender" )
          output$plot     = rendered$plot
          output$selector = rendered$selector
      }
  ) 
## End(Not run)

GregorDeCillia/shinyLikert documentation built on May 6, 2019, 6:36 p.m.