HistTable: HistTable

View source: R/histtable.R

HistTableR Documentation

HistTable

Description

Creates a pretty formattable table showing histograms

Usage

HistTable(
  data.values,
  class.memberships = NULL,
  class.sizes = NULL,
  title = "",
  subtitle = "",
  footer = "",
  bin.size = 5,
  bin.min = 0,
  bin.max = 100,
  hist.width = 100,
  hist.height = 20,
  show.tooltips = TRUE,
  color.negative = FALSE,
  histogram.column.name = "Distribution",
  prior.columns = NULL,
  show.row.names = TRUE,
  row.lines.to.thicken = NULL,
  ...
)

Arguments

data.values

A dataframe, with each column containing the values to create a histogram.

class.memberships

Class memberships for each respondent.

class.sizes

Sizes of each class as proportions.

title

The title of the table.

subtitle

The subtitle of the table.

footer

The footer of the table.

bin.size

Size of the bins used in the histogram. The breakpoints are given by seq(bin.min, bin.max, bin.size).

bin.min

Any value in data.values smaller then this will be truncated to bin.min.

bin.max

Any value in data.values larger then this will be truncated to bin.max.

hist.width

Width of the histogram cell in any valid CSS size unit

hist.height

Height of the histogram cell

show.tooltips

Whether to display tooltips of the bar heights

color.negative

Whether to show negative bars in coral.

histogram.column.name

Name for the histogram column.

prior.columns

Columns before the histogram column.

show.row.names

Whether to show row names in the table (the names of data.values).

row.lines.to.thicken

The indices of the row lines to be shown thicker.

...

Additional columns to add to the table.

Examples

dat <- data.frame(A=rpois(500,5), B=rpois(500,50), C=rpois(500,20))
print(HistTable(dat, 'Mean Probability'=c(5,50,100)))

NumbersInternational/flipFormat documentation built on Feb. 26, 2024, 5:36 a.m.