graph_mcmo: Graphs an MCMO question

Description Usage Arguments Examples

Description

This function creates a horizontal bar graph for an MCMO question

Usage

1
2
graph_mcmo(item, sort = "alpha", custom = NULL, stat = "count",
  fill = "seagreen", ...)

Arguments

item

Data vector from MCMO question

sort

Specifies the order of the items in the graph. 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

stat

The statistic for the frequency, either count or percent, default is "count"

fill

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

Examples

1
2
# Graphs an MCMO question
graph_mcmo(survey$Q3, sort="custom", custom=c("Grains", "Fruits", "Vegetables"))

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