
Replace 'reactable' Column Headers with Team Logos
Source:R/reactable_sdv.R
reactable_sdv_cols_label.RdBuilds a named list of reactable::colDef() objects whose
headers are team logos, for data frames whose column names are team
abbreviations. Columns that cannot be resolved are left out of the list so
reactable falls back to the plain column name.
Arguments
- .data
A data frame whose column names are team abbreviations.
- ...
Additional arguments passed to every
reactable::colDef().- sport
Character string identifying the sport. One of
supported_sports().- variant
Character. Logo variant:
"primary","dark","light","alt","classic", or"helmet"(NFL only). Falls back to the primary image when the requested variant is not available for a team.- height
Numeric. Image height in pixels.
Value
A named list of colDef objects for the columns argument of
reactable::reactable().