This function set labels for specified columns in a single row header of a flextable.
set_header_labels(x, ..., values = NULL)
a flextable
object
named arguments (names are data colnames), each element is a single character value specifying label to use.
a named list (names are data colnames), each element is a single character
value specifying label to use. If provided, argument ...
will be ignored.
Other headers and footers:
add_header_lines()
,
add_header_row()
,
add_header()
,
set_header_footer_df
# NOT RUN {
ft <- flextable( head( iris ))
ft <- set_header_labels(ft, Sepal.Length = "Sepal length",
Sepal.Width = "Sepal width", Petal.Length = "Petal length",
Petal.Width = "Petal width"
)
ft <- flextable( head( iris ))
ft <- set_header_labels(ft,
values = list(Sepal.Length = "Sepal length",
Sepal.Width = "Sepal width",
Petal.Length = "Petal length",
Petal.Width = "Petal width" ) )
ft
# }
Run the code above in your browser using DataLab