gt
gt copied to clipboard
character vector for column labels?
With labeling columns I understand that both uses of cols_label() below are valid but isn't the second, also requiring a named list, superfluous?
gt() %>%
cols_label(my_label = "My Label", another_one = "Another Label")
gt() %>%
cols_label(.list= list(my_label = "My Label", another_one = "Another Label"))
It seems that allowing a simple character vector would be an enhancement by reducing typing. Naturally, this would require that all columns get new labels and the character vector be equal to ncol() of the data frame.
gt() %>%
cols_label(col_names = c("My Label", "Another Label"))
Thanks.
This is a good idea. We need to think of a nice way to implement this but I'm sure it can be done!