Description Usage Arguments Value Examples
Add cells formatting
1 |
mmtable |
an mmtable object |
... |
arguments for add_cells_format |
an mmtable
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | ## Not run:
library(tidyverse)
gm_table_piped <-
gapminder_mm %>%
filter(var != "Life expectancy") %>%
mmtable(cells = value, use_defaul_formats = T) %>%
add_header_top(year) %>%
add_header_left(country) %>%
add_header_top_left(var) %>%
add_header_left_top(continent) %>%
add_cells_format(cell_predicate = T, style = list(cell_text(align = "right"))) %>%
add_header_format(header = year, style = list(cell_text(align = "right"))) %>%
add_header_format("all_cols", style = list(cell_text(weight = "bolder"))) %>%
add_header_format("all_rows", style = list(cell_text(weight = "bolder"))) %>%
add_table_format(
locations = cells_body(rows = c(1,3,5,7,9,11)),
style = list(cell_borders(sides = "top",color = "grey"))) %>%
add_table_source_note(source_note = "Excerpt of the Gapminder dataset." )
gm_table_piped
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.