graph_numeric: Graphs a single numeric question

Description Usage Arguments Examples

Description

This function creates a histogram for a numeric question

Usage

1
2
graph_numeric(item, unit, xmin = 0, xmax = max(item) + binwidth,
  binwidth = 1, fill = "darkmagenta")

Arguments

item

Data vector from numeric question

unit

String with the unit of the vector

xmin

The lower bound of the x axis, default is 0

xmax

The upper bound of the x axis, default is the maximum data value, plus the binwidth

binwidth

The width of histogram bins, default is 1

fill

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

Examples

1
2
# Graphs a numeric variable
graph_numeric(survey$age, "Years")

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