nfl_standings_prettify {nflseedR} | R Documentation |
Compute Pretty NFL Standings Table
Description
Uses the R package gt to create a pretty html table of NFL standings.
Usage
nfl_standings_prettify(
standings,
...,
grp_by = c("div", "conf", "nfl"),
order_by = c("div_rank", "conf_rank", "draft_rank"),
reverse = FALSE
)
Arguments
standings |
A table of NFL standings. Usually computed by |
... |
Currently unused. The function errors if objects are passed to the dots, i.e. when unnamed arguments are provided. |
grp_by |
Group the output table by Division ( |
order_by |
Order teams by division rank, conference rank, or draft rank |
reverse |
Teams are sorted by the argument |
Value
An object of class gt_tbl
.
Output of below examples
Examples
# Calculate standings
s <- nflreadr::load_schedules(2024) |>
nflseedR::nfl_standings(ranks = "DRAFT")
# Create table
tbl1 <- nfl_standings_prettify(s, grp_by = "conf", order_by = "conf_rank")
tbl2 <- nfl_standings_prettify(s, grp_by = "nfl", order_by = "draft_rank")
# The output of tbl1 and tbl2 is given in the above images.
[Package nflseedR version 2.0.0 Index]