graph_mcso: Graphs an MCSO question

Description Usage Arguments Examples

Description

This function creates a horizontal bar graph for an MCSO option question

Usage

1
graph_mcso(item, sort = "alpha", custom = NULL, fill = "dodgerblue4", ...)

Arguments

item

Data vector from MCSO question

sort

Specifies the order of the items in the graph, default is "alpha." Options include: descending - in descending order by frequency, ascending - in ascending order by frequency, alpha - in alphabetical order, custom - in some custom order specified in the custom parameter

custom

If sort="custom", the order of the options to be graphed

fill

Specifies the color of the bars in the graph, default is "dodger blue 4." See <http://sape.inf.usi.ch/quick-reference/ggplot2/colour> for color references

Examples

1
2
# Graphs an MCSO question
graph_mcso(survey$Q4, sort="custom", custom=c("Grains", "Fruits", "Vegetables"))

rblissett/pubpub documentation built on May 29, 2019, 6:53 p.m.