Description Usage Arguments Value Examples
Format table cells
1 | cells_format(cell_predicate, ...)
|
cell_predicate |
an expression on the source data frame identifying which cells should be formatted. |
... |
dots. |
format list
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.