stat_boxes_group: Generate a group of stat boxes sets.

Description Usage Arguments Details Value Examples

View source: R/statbox.R

Description

Generate a group of multiple sets of six related stat boxes that summarize the distribution of values from a multiple data frames.

Usage

1
2
3
4
5
6
stat_boxes_group(x, clrby, type = "annual", style = "valueBox",
  rnd = 0, height = "110px", width.icon = "90px", text.size = 75,
  value.size = 150, output = "boxes",
  main_title = "<h4>Aggregate period statistics</h4>",
  clrs.default = list(c("light-blue", "blue")), prevent,
  theme = "white")

Arguments

x

a master data frame, which may or may not be split into multiple groups, depending on clrby.

clrby

character, column name of x to color groups of stat box sets by. May be NULL.

type

character, type of stat box set. Must be "annual" (default) or "decadal".

style

character, "valueBox" (default) or "infoBox".

rnd

decimal places to round data to for appearance in stat box (valueBox widget). Defaults to 0.

height

character, stat box height. defaults to "110px".

width.icon

character, icon image width, defaults to "90px".

text.size

numeric, scaling for text size, defaults to 75. See details.

value.size

numeric, scaling for value size, defaults to 150. See details.

output

character, "boxes" (default) or "list". A list is useful for returning raw output, e.g. for sending to a rmarkdown report.

main_title

character, typically contains html. Defaults to "<h4>Aggregate period statistics</h4>".

clrs.default

list of color vectors, one vector for each group.

prevent

logical, whether stat boxes should be prevented (contextual, e.g., no data available in app).

theme

color theme, either "white" (default) or "black".

Details

text.size and value.size are length-six or length-one (repeated) vectors. Defaults are better suited to type = "valueBox" than type = "infoBox". See stat_boxes directly for more information on internal function. If there is a need to have more complete control over customizing content of value or info boxes, use valueBox or infoBox directly. stat_boxes and stat_boxes_group are two levels of wrapper functions that are intended to produce specific content for summarizing values in a data frame, pooled or by group, respectively.

Value

a group list of tag lists containing stat box sets.

Examples

1
#not run

leonawicz/snaputils documentation built on May 20, 2019, 10:21 p.m.