Learn R Programming

fifer (version 1.1)

colored.table: Create a color-coded table in latex

Description

Create a color-coded table in latex

Usage

colored.table(data, file, dep.var, row.factors, col.factors, breaks = 4,
  round = 2, rng = NULL, FUN = mean, row.prefix = NULL,
  col.prefix = NULL, custom.breaks = NULL, return.table = F, ...)

Arguments

data
the dataset in "long" format, where the conditions are on columns.
file
the location where the file should be exported.
dep.var
A string naming the dependent variable
row.factors
A vector of one or two elements, each of which is a string indicating the name of the row factor(s)
col.factors
A vector of one or two elements, each of which is a string indicating the name of the col factor(s)
breaks
The number of breaks in color. Defaults to 4.
round
How many digits should the matrix be rounded to? Defaults to 2.
rng
The range of values used for coloring the plot.
FUN
The function used to summarize the table (defaults to mean)
row.prefix
Any values that precede the rows (e.g., "r^2 = ").
col.prefix
Any values that precede the columns.
custom.breaks
The points at which the colored table changes colors. If left to NULL, the function will automatically choose them.
return.table
Should the function return the table as output?
...
Other arguments passed to Hmisc

See Also

Hmisc::latex

Examples

Run this code
## do this later

Run the code above in your browser using DataLab