nation_trend: Performance Trends By Nation

Description Usage Arguments Value Examples

View source: R/nation_trend.R

Description

Only considers results from major international races and summarises them by the number of race results at a particular level (wins, podiums, etc.) per race.

Usage

1
2
nation_trend(nations, race_gender = c("Men", "Women"),
  race_type = c("Distance", "Sprint"))

Arguments

nations

character vector of nation codes

race_gender

character; one of "Men" or "Women"

race_type

character; one of "Distance" or "Sprint"

Value

A named list with components:

  1. plot - ggplot2 plot object

  2. nation_data - raw data for each nation

  3. nation_summary - summarised data by nation

  4. race_data - race counts used for plotting

Examples

1
2
3
4
5
6
7
8
## Not run: 
library(ggplot2)
p <- nation_trend(nations = c('USA','CAN','RUS','SWE'),
                  race_gender = 'Men',
                  race_type = 'Distance')
print(p$plot)

## End(Not run)

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