简体   繁体   中英

Removing all line spacing from a flextable using flextable and officer packages in R

How do you remove all line spacing in a flextable when creating a flextable using the flextable package and printing it into a powerpoint document using the officer package in R?

By default it appears to have line spacing 1.0 with spacing 2 pt before and 2 pt after. How do I get it so I have spacing 0 pt before and 0 pt after?

Thanks a lot!

You can use function padding for that:

library(flextable)
library(magrittr)

regulartable(head(iris)) %>% 
  padding(padding = 0, part = "all") %>% 
  autofit() %>% 
  print(preview = "pptx")

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM