race_snapshot_dst: Race Snapshots

Description Usage Arguments Value Examples

View source: R/race_snapshot.R

Description

Distance and sprint race snapshot graphs for major international distance events.

Usage

1
2
3
race_snapshot_dst(race_id, title = "", cutoff = 365 * 4, reduced = TRUE)

race_snapshot_spr(race_id, title = "", cutoff = 365 * 4, reduced = TRUE)

Arguments

race_id

integer race id

title

race title

cutoff

integer number of days in past to gether data from

reduced

boolean; if TRUE only show top 30 plus North Americans

Value

A named list with components:

  1. plot - ggplot2 plot object

  2. cur_race - raw results for race in question

  3. ath_min - data for athletes with too few races to plot range bars

  4. ath_bars - data for athlete range bars

  5. block - data frame for color blocks in plot

Examples

1
2
3
4
5
6
## Not run: 
library(ggplot2)
p <- race_snapshot_dst(race_id = 7902)
print(p$plot)

## End(Not run)

joranE/statskier2 documentation built on May 19, 2019, 8:42 p.m.