I would like to change to bold the titles of Consumer Non-Durables, Healthcare, Hitech, etc...
This is the code I am using
# Create a table using gt
table <- wide_summary_df %>%
gt() %>%
tab_header(
title = "Summary Table",
subtitle = "Total Acqprop by Year, Newname, and Decile"
) %>%
cols_label(
newname = "Newname",
decile = "Deciles per sector"
) %>%
fmt_percent(decimals = 1, columns = c("1985", "1990", "1995", "2001", "2008", "2020" ))%>%
tab_style(
style = cell_text(weight = "bold"),
locations = cells_body(
columns = decile
))
# Print the table
table
# Print the table
table
You could add a line to bold that column with
cells_body(1,)
. I tested this with another gt I had open but I didn't test your code.Source: Location helper for targeting row groups