chartColumn: Column Chart Based on 'ggplot2'

Description Usage Arguments Value Author(s) See Also

Description

Columns (vertical bar) chart using ggplot2, with or without benchmarking lines.

Usage

1
2
3
4
5
6
7
8
chartColumn(data, xvar, yvar, gvar = NULL, title = paste("Chart:",
  yvar, "~", xvar), position = "dodge", annotate = "number2",
  xlab = xvar, ylab = yvar, palette = getOption("init.pal"),
  hline = data.frame(label = NA, linetype = "solid", value = NA),
  vline = data.frame(label = NA, linetype = "solid", value = NA),
  line = list(list(label = NA, linetype = "solid", arrow = FALSE, value =
  data.frame(x = NA, y = NA))), alt.font = "SimHei", theme = "wsj",
  plot.background = "antiquewhite1", ...)

Arguments

data

Data frame for ploting.

xvar

Variable name of x.

yvar

Variable name of y.

gvar

Variable name of grouping factor.

title

String. Chart title. Default paste("Chart:", yvar,"~", xvar)

position

'dodge' or 'stack'.

annotate

Format of the annotation. 'number(n)', 'percent(n)', 'comma' or 'dollar'.

xlab

Label wording of x axis. Default xvar.

ylab

Label wording of y axis. Default yvar.

palette

Palette name, default 'aetnagreen'

hline

A data frame with columns of 'label', 'linetype' and 'value'. Each record makes a horizontal line.

vline

A data frame with columns of 'label', 'linetype' and 'value'. Each record makes a vertical line.

line

A list. Default value is list(list(label=NA, linetype='solid', arrow=FALSE, value=data.frame(x=NA, y=NA))). You should define the label, linetype, arrow and value (a data frame consisting of x and y) of the free-style line.

alt.font

Define alternative font name for plotting. Default 'SimHei'.

theme

The theme name. Only accepts themes in ggplot2 and ggthemes. Default 'wsj'.

plot.background

The color name of the plot background. Default 'antiquewhite1'.

...

ignore

Value

A ggplot2 object.

Author(s)

Yiying Wang, wangy@aetna.com

See Also

getAetnaPal


madlogos/aseshms documentation built on May 21, 2019, 11:03 a.m.