| add_break_columns | R Documentation |
Inserts an empty column after (or before) each selected column. In
apa_flextable(), empty columns separate groups of columns, such as
those under different column spanners.
add_break_columns(
data,
...,
.before = FALSE,
omit_first = FALSE,
omit_last = FALSE,
d
)
data |
data.frame or tibble |
... |
columns after which break columns are inserted: unquoted or
quoted names, or tidyselect helpers (e.g., |
.before |
if |
omit_first |
if |
omit_last |
if |
d |
deprecated; use |
data.frame or tibble
d <- data.frame(x_n = 3, x_mean = 4,
y_n = 5, y_mean = 6,
z_n = 4, z_mean = 4)
# Unquoted variable names
add_break_columns(d, x_mean)
# Character vector
add_break_columns(d, c("y_n", "z_n"), .before = TRUE)
# Tidyselect function (contains, starts_with, ends_with,
# matches, num_range, all_of, any_of)
# Insert columns after all columns
# ending with "_mean" except the last instance
add_break_columns(d,
dplyr::ends_with("_mean"),
omit_last = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.