multipleChoicePlot: CES Multiple choice Plot Function to summarise and plot graph...

View source: R/multiple_response_plots.R

multipleChoicePlotR Documentation

CES Multiple choice Plot Function to summarise and plot graph of select_multiple/tick all that apply questions Creates summary data and plots at two disaggregation levels Also creates a simpler graph if necessary

Description

CES Multiple choice Plot Function to summarise and plot graph of select_multiple/tick all that apply questions Creates summary data and plots at two disaggregation levels Also creates a simpler graph if necessary

Usage

multipleChoicePlot(
  data,
  var2work,
  firstLevelDisaggregation,
  secondLevelDisaggregation,
  thresholdInclude = 0,
  nFacetCols = 3,
  splittr = F,
  labels = vector(),
  simple = F,
  xLabel = "District",
  yLabel = "Percentage of children interviewed",
  rotate.x.labels = 0
)

Arguments

data

A data frame of multiple choice responses

var2work

A response variable to plot

firstLevelDisaggregation

A primary grouping variable

secondLevelDisaggregation

A secondary grouping variable

thresholdInclude

A number of proportion 0-1

nFacetCols

Number of facet columns

splittr

If TRUE, splits facet_wrap variables. Defaults to FALSE.

simple

If FALSE, adds geom_jitter. Defaults to FALSE

xLabel

The x-axis label

yLabel

The y-axis label

rotate.x.labels

Rotates x-axis tick labels

Value

A list of plot and summary data


SCIFoundation/sciCoverageR documentation built on Oct. 31, 2024, 11:45 p.m.