Skip to content

Instantly share code, notes, and snippets.

@padpadpadpad
Last active September 25, 2023 14:22
Show Gist options
  • Save padpadpadpad/416d85003f4cf01ed9fd2a61754d9183 to your computer and use it in GitHub Desktop.
Save padpadpadpad/416d85003f4cf01ed9fd2a61754d9183 to your computer and use it in GitHub Desktop.
# random flextable example to put a symbol in a column
librarian::shelf(tidyverse, flextable, officer)
data(mpg)
# copyright symbol
copyright_symbol <- "\U00A9"
black_dot <- "\U2B24"
table <- select(mpg, manufacturer, model) %>%
distinct() %>%
mutate(copyright_col = 'test') %>%
flextable() %>%
compose(j = 3,
value = as_paragraph(as_chunk(copyright_symbol, props = fp_text(color = 'black'))),
part = "body")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment