The gt_fmt_cfb function takes an existing gt_tbl object and converts college football team names from valid_team_names() into inline team logos. This is a wrapper around gtExtras::gt_image_rows() written by Tom Mock, which is a wrapper around gt::text_transform() + gt::web_image()/gt::local_image() with the necessary boilerplate already applied.

gt_fmt_cfb(gt_object, columns, height = 30)

Arguments

gt_object

An existing gt table object of class gt_tbl

columns

The columns wherein changes to cell data colors should occur.

height

The absolute height (px) of the image in the table cell.

Value

An object of class gt_tbl.

Figures

Examples

library(gt) library(cfbplotR) df <- data.frame(team = valid_team_names()[1:8],logo = valid_team_names()[1:8]) table <- df %>% gt() %>% gt_fmt_cfb(columns = "logo")