Nothing
library(knitr) library(officedown) library(flextable) opts_chunk$set( echo = FALSE, ft.tabcolsep = 3 )
dat <- tibble::tribble( ~S, ~T, ~U, ~V, ~W, ~X, ~Y, ~Z, "AA", "AA", "AA", "AA", "AA", "AA", "AA", "AA", "BB", "AA", "AA", "AA", "AA", "AA", "AA", "AA", "CC", "CC", "AA", "AA", "AA", "AA", "AA", "AA", "DD", "DD", "DD", "AA", "AA", "AA", "AA", "AA", "EE", "EE", "EE", "EE", "AA", "AA", "AA", "AA", "FF", "FF", "FF", "FF", "FF", "AA", "AA", "AA", "GG", "GG", "GG", "GG", "GG", "GG", "AA", "AA", "HH", "HH", "HH", "HH", "HH", "HH", "HH", "AA" ) ft <- flextable(dat) ft <- theme_vader(ft) ft <- border_outer(ft, border = fp_border_default(width = 2.5, color = "red")) ft <- border_inner_v(ft, border = fp_border_default(width = 1, color = "cyan")) ft <- border_inner_h(ft, border = fp_border_default(width = 1, color = "orange")) ft <- merge_h(ft) ft <- fix_border_issues(ft) ft
ft <- flextable(head(iris, n = 2)) ft <- border_inner_v(ft, part = "all") ft <- hline(ft, i = 1, j = 2:4, part = "body", border = officer::fp_border("red") ) ft <- hline(ft, i = 1, j = 1:1, part = "body", border = officer::fp_border("orange") ) ft <- autofit(ft) ft
\pagebreak
dat <- data.frame( s = c("a", "a", "a", "a", "b", "b", "b", "b"), t = c("AA", "AA", "AA", "BB", "BB", "BB", "CC", "CC"), u = c("DD", "DD", "DD", "DD", "DD", "DD", "DD", "DD"), v = c("DD", "EE", "EE", "DD", "EE", "EE", "EE", "DD"), w = c("DD", "EE", "EE", "DD", "EE", "EE", "EE", "DD"), x = c("DD", "DD", "DD", "DD", "DD", "DD", "DD", "DD") ) ft <- flextable(dat) ft <- border_outer(ft, border = fp_border_default(width = 2.5, color = "red")) ft <- border_inner_v(ft, border = fp_border_default(width = 1, color = "cyan")) ft <- border_inner_h(ft, border = fp_border_default(width = 1, color = "orange")) ft <- merge_v(ft, j = 1:2) ft <- merge_h(ft) ft <- fix_border_issues(ft) ft
ft <- flextable(dat) ft <- theme_vader(ft) ft
\pagebreak
ft <- border_outer(ft, border = fp_border_default(width = 2.5, color = "red")) ft <- border_inner_v(ft, border = fp_border_default(width = 1, color = "cyan")) ft <- border_inner_h(ft, border = fp_border_default(width = 1, color = "orange")) ft <- merge_v(ft, j = 1:2) ft <- merge_h(ft) ft <- fix_border_issues(ft) ft
dt <- data.frame( stringsAsFactors = FALSE, V1 = c("OOOOOOOO", "OOOOOOOO", "OOOOOOOO"), V2 = c("XXX", "XXX", "YYY"), V3 = c("ZZZ", "ZZZ", "ZZZ"), V4 = c("XXXX XXXX XXXX XXXX", "XXXX XXXX XXXX XXXX", "XXXX XXXX XXXX XXXX") ) dt |> flextable() |> set_table_properties( layout = "autofit", width = .8, opts_pdf = list(tabcolsep = 3) ) |> merge_v(j = ~ V1 + V2) |> valign(valign = "top", part = "all") |> border_inner_h(part = "all") |> border_inner_v(part = "all") |> border_outer(part = "all", border = fp_border_default(color = "red")) |> autofit() |> fix_border_issues(part = "all")
ft <- as_flextable(cars) ft <- theme_zebra(ft) ft <- hline(ft, j = 2, part = "body") ft
kable(head(iris))
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.