cells_format: Format table cells

Description Usage Arguments Value Examples

View source: R/cells_format.R

Description

Format table cells

Usage

1
cells_format(cell_predicate, ...)

Arguments

cell_predicate

an expression on the source data frame identifying which cells should be formatted.

...

dots.

Value

format list

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
## Not run: 
gm_table_formatted <-
  gapminder_mm %>%
  dplyr::filter(var != "Life expectancy") %>%
  mmtable(cells = value) +
  header_top(year) +
  header_left(country) +
  header_top_left(var)  +
  header_left_top(continent)  +
  cells_format(cell_predicate = T, style = list(cell_text(align = "right"))) +
  header_format(header = year, style = list(cell_text(align = "right"))) +
  header_format("all_cols", style = list(cell_text(weight = "bolder"))) +
  header_format("all_rows", style = list(cell_text(weight = "bolder"))) +
  table_format(
    locations = cells_body(rows = c(1,3,5,7,9,11)),
    style = list(cell_borders(sides = "top",color = "grey"))) +
  table_source_note(source_note = "Excerpt of the Gapminder data" )

## End(Not run)

ianmoran11/mmtable2 documentation built on Dec. 20, 2021, 5:58 p.m.