tableShade: Generate a shaded table.

Description Usage Arguments Value See Also Examples

View source: R/tableShade.R

Description

tableShade takes a SimDesign dataframe object, and returns a shaded table.

Usage

1
2
3
tableShade(dat, table_vars = NULL, method = "mean", ndigit = 2,
  colswitch = 0.6, numrow = 2, colours = "Blues",
  main_title = "Shaded Table", xlab = NULL, ylab = NULL, ...)

Arguments

dat

A data.frame object of class(SimDesign).

table_vars

A character vector pertaining to the variables that will be presented on the display. The first element specifies the facetting variable, the second the X-axis.

method

A character vector of length 1 pertaining to the method to be used to summarize results.

ndigit

An integer indicating the number of decimal places to use in the labelling.

colswitch

A numeric value indicating where to switch from black text to white.

numrow

An integer value indicating the number of rows to use in the facet grid.

main_title

A character value for the main title of the plot.

xlab

A character value for the x-axis label.

ylab

A character value for the y-axis label.

...

Additional parameters passed onto ggplot2.

cols

A character value indicating the palette to use.

Value

A ggplot2 object.

See Also

SimDisplay

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
data(Brown1974)
dat <- subset(Brown1974, var_ratio != 1)
tableShade(dat, table_vars = c("distribution", "var_ratio"))

# Adding optional arguments:
tableShade(dat, table_vars = c("distribution", "var_ratio"),
           main_title = "Power Rates by Variance Ratio and Distribution",
           xlab = "Variance Ratio", ylab = "Outcome Variable",
           numrow = 1, ndigit = 1, colswitch = .7, colours = "Reds")

## End(Not run)

mattsigal/SimDisplay documentation built on May 21, 2019, 1:25 p.m.