mlspCrosstabBar: Make a grouped bar graph of a crosstab table

Description Usage Arguments Details Value

View source: R/GraphFunctions.R

Description

mlspCrosstabBar creates a bar graph of a crosstab table

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
mlspCrosstabBar(
  tableinput,
  titlevar = NULL,
  title = NULL,
  subtitle = NULL,
  fillPalette = "guess",
  theme = "default",
  xlab = NULL,
  PlotMargins = c(0.25, 0, 3.5, 0.5),
  wraptitle = 90,
  legendPosition = "top",
  legendJust = "right",
  facetncol = NULL,
  ylimits = NULL
)

Arguments

tableinput

The source table created by make.crosstab()

titlevar

A quoted variable name. If supplied, the full text of this variable will be the title

title

A character string. If supplied it will be the graph's title.

subtitle

If supplied, it will be the graph's subtitle

fillPalette

defaults to "guess", in which case a "best-guess" palette is assigned. This argument also accepts the name of ColorBrewer palette or a character vector of color names.

theme

Optional. One of either "LubarSlides" or "MLSP". This sets the theme to theme_LubarSlides or theme_MLSP, respectively.

xlab

an optional x-axis name

PlotMargins

Only applicable when theme = "LubarSlides". It allows the user to manually change the plot.margin parameter.

wraptitle

= the length at which to wrap the character title string. By default it is 90 which matches the width of a LubarSlide.

legendPosition

the position of legends ("none", "left", "right", "bottom", "top", or two-element numeric vector)

legendJust

anchor point for positioning legend inside plot ("center" or two-element numeric vector) or the justification according to the plot area when positioned outside the plot

facetncol

optional, the number of facet columns

ylimits

optional y-axis limits parameter

Details

This function takes a crosstab table created with make.crosstab() and returns it as a bar chart.

Value

A dataframe.


jdjohn215/MLSPTools documentation built on Sept. 2, 2020, 1:16 a.m.