graph_linkednum: Graphs multiple numeric questions

Description Usage Arguments Examples

Description

Creates plots for numeric questions where their distributions are meant to be comparable to each other (e.g., where they are supposed to sum to 100)

Usage

1
2
graph_linkednum(items, labels, sort = "entry", totalcheck = NA,
  central = "mean", spread = "sd1", fill = "tomato1")

Arguments

items

Data frame with only items to be graphed

labels

Vector, in order of items columns, with names of items

sort

The order in which items should be displayed upon graphing. Options include: entry - options are in the order of the original columns, and descending - options are in descending order by the chosen central statistic

totalcheck

Includes a value for if the user wants to omit rows for which the constituent items do not correctly add up to some total value

central

For horizontal bar graphs, specifies the statistic used for the height of the bars. Options include: mean for the arithmetic mean, and median for the median

spread

For horizontal bar graphs, specifies the statistic used for the endpoints of the error bars. Options include: sd1 for a width of one standard deviation, sd2 for a width of 1.96 standard deviations, and minmax for a width using the range of the data

fill

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

Examples

1
2
3
4
# Graph all time use questions
graph_linkednum(survey[get_matchvars(survey, "TimeUse_")], 
                       labels=c("Talking", "Eating", "Drinking"),
                       totalcheck=100)

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