Skip to content

Padding does not appear on pdf #607

Answered by davidgohel
FarahKhandwala asked this question in Q&A
Discussion options

You must be logged in to vote

PDF does not support padding, you can use \t instead

library(flextable)
library(magrittr)

df <- structure(list(
  type = c("glop glop", "glop glop" , "glop glop", "pas glop pas glop", "pas glop pas glop"), 
  what = c("Group", "Age", "Residence", "Smoker", "Europe"), 
  `1` = c(63, 25, 25, 15, 15), 
  `2` = c(23, 53, 53, 74, 11),
  `3` = c(85, 22, 43, 13, 15)
), 
row.names = c(NA, -5L), 
class = c("data.frame"))

as_grouped_data(df, groups = "type") %>%
  as_flextable() %>%
  add_footer_lines("Observed event") %>%
  set_header_labels(what = "") %>%
  color(part = "footer", color = "#800000") %>%
  bold( bold = TRUE, part="header") %>%
  prepend_chunks(i = ~ is.na(type), 
                …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by davidgohel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants