| set_header_labels | R Documentation |
This function set labels for specified columns in the bottom row header of a flextable.
set_header_labels(x, ..., values = NULL)
x |
a |
... |
named arguments (names are data colnames), each element is a single character value specifying label to use. |
values |
a named list (names are data colnames), each element is a single character
value specifying label to use. If provided, argument |
Other functions for row and column operations in a flextable:
add_body(),
add_body_row(),
add_footer(),
add_footer_lines(),
add_footer_row(),
add_header(),
add_header_row(),
delete_columns(),
delete_part(),
delete_rows(),
separate_header(),
set_header_footer_df
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
ft <- flextable(head(iris))
ft <- set_header_labels(
x = ft,
values = c(
"Sepal length",
"Sepal width", "Petal length",
"Petal width", "Species")
)
ft
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.