Format table cells
cells_format(cell_predicate, ...)
cell_predicate | an expression on the source data frame identifying which cells should be formatted. |
---|---|
... | dots. |
format list
if (FALSE) { 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" ) }