Has anyone had the following issue with gt table?
Regardless of the value I set for the tab style row argument the whole column gets hit with the color argument. I only want the "Paid Per Episode" column to color it blue when it is greater than 33000.
Could this be something with R markdown?
hip_dt_epsd_table %>% rename(State = JUR_ST_ABBR_PRIM, Episodes = epsd_count, "Paid Per Episode" = pd_per_epsd, "Episodes Outlier" = epsd_outlier, "Paid Per Episode Outlier" = pd_epsd_outlier, "Episodes 99th Percentile" = epsd_count_99th) %>% gt() %>% fmt_currency(columns=vars("Paid Per Episode","Paid Per Episode Outlier")) %>% fmt_number(columns=vars("Episodes","Episodes Outlier","Episodes 99th Percentile"),sep_mark=",", drop_trailing_zeros = TRUE) %>% tab_style( style = cell_fill(color = "lightblue"), locations = cells_body( columns = "Paid Per Episode", row = "Paid Per Episode" > 33000))
https://stackoverflow.com/questions/67013763/gt-table-coloring-full-column-with-row-filter April 09, 2021 at 09:08AM
没有评论:
发表评论