HistTable | R Documentation |
Creates a pretty formattable table showing histograms
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,
...
)
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 |
bin.min |
Any value in |
bin.max |
Any value in |
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. |
dat <- data.frame(A=rpois(500,5), B=rpois(500,50), C=rpois(500,20))
print(HistTable(dat, 'Mean Probability'=c(5,50,100)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.