Description Usage Arguments Details Value Examples
Alter column names of an object initialized by grob_matrix
.
1 2 3 4 5 6 | alter_column_names(
mat,
column_names = list(),
column_name_cols = list(),
group_elements = TRUE
)
|
mat |
The grob matrix object the column names will be edited in. |
column_names |
The replacement column names,
in a list with each column name a separate element. The list must have
the same amount of elements as the |
column_name_cols |
Which column positions of the initial data frame / matrix the Can either be numeric indices, or column names of the initial data frame / matrix
passed through Default is an empty list. If unaltered, the function will assume the user
wants to apply |
group_elements |
A boolean argument on whether like, adjacent column names should be grouped together. |
The user can only use this function if the initial data frame / matrix
passed through grob_matrix
had column names to begin with.
The underlying column names will be unaffected. So, if the user wants to use
alter_at
afterwards, he/she should select the original column names
and not the replacements from this function.
The initial grob matrix object with column names edited in the appropriate areas.
1 2 3 4 | data.frame(var1 = c(5, 14, 6, 10), var2 = c(3, 30, 17, 7)) %>%
grob_matrix() %>%
alter_column_names(c('COLUMN NAME')) %>%
view_grob()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.