Set spans to group columns

colgroup(
  title = NULL,
  vars = c(),
  level = 1,
  sep = ".",
  split = FALSE,
  title_side = c(".l", ".r"),
  align = c("c", "l", "r")
)

as.span(
  title = NULL,
  vars = c(),
  level = 1,
  sep = ".",
  split = FALSE,
  title_side = c(".l", ".r"),
  align = c("c", "l", "r")
)

colsplit(
  sep,
  level = 1,
  split = TRUE,
  title = NULL,
  title_side = c(".l", ".r"),
  align = c("c", "l", "r")
)

is.colgroup(x)

is.colsplit(x)

Arguments

title

label for groups of columns

vars

tidyselect specification of variables

level

relative position for the grouping spanner; level 0 is the column names; level 1 is one step away (up) from the column names, etc

sep

character; the separator used for finding column groupings

split

logical; if TRUE column groupings will be determined by splitting columns names on a separator

title_side

which side of the split should be taken as the title? defaults to left (.l) but can also take the right (.r) side of the split

align

justify the span title to the center, left or right

x

an R object

Value

an object with class colgroup