3

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!

Jordan Hackett
  • 689
  • 3
  • 11

1 Answers1

9

You can use function padding for that:

library(flextable)
library(magrittr)

flextable(head(iris)) %>% 
  padding(padding = 0, part = "all") %>% 
  autofit() %>% 
  print(preview = "pptx")
David Gohel
  • 9,180
  • 2
  • 16
  • 34