# \donttest{
library(gt)
label_df <- data.frame(
"00-0036355" = 1,
"00-0033873" = 2,
"LAC" = 11,
"KC" = 12,
check.names = FALSE
)
# create gt table and translate player IDs and team abbreviations
# into headshots, logos, and wordmarks
table <- gt::gt(label_df) |>
nflplotR::gt_nfl_cols_label(
columns = gt::starts_with("00"),
type = "headshot"
) |>
nflplotR::gt_nfl_cols_label("LAC", type = "wordmark") |>
nflplotR::gt_nfl_cols_label("KC", type = "logo")
# }
Run the code above in your browser using DataLab