Removing title row border from flextable

Hi all,
I'm trying to get some tables formatted nicely in APA 7 style, but I'm struggling hard with {flextable} lately. The tables come out pretty close to ok as is, except for the top border....

mtcars |> slice(1:5) |> flextable() |> add_header_lines(values = "A TITLE")

Does anyone know how to remove the border line above only the title?

You can use the following code:

library(flextable)
library(dplyr)
mtcars |> 
  slice(1:5) |> flextable() |> 
  add_header_lines(values = "A TITLE") |> 
  hline_top(border = fp_border_default(width = 0), 
            part = "header")
1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.