ft <- flextable(head(iris),
col_keys = c(
"Species", "Sepal.Length", "Petal.Length",
"Sepal.Width", "Petal.Width"
)
)
ft <- add_body(
x = ft, Sepal.Length = 1:5,
Sepal.Width = 1:5 * 2, Petal.Length = 1:5 * 3,
Petal.Width = 1:5 + 10, Species = "Blah", top = FALSE
)
ft <- theme_booktabs(ft)
ft
Run the code above in your browser using DataLab