Get the debut races, podiums or victories for an athlete
Arguments
- athlete
a list or data frame with fields/columns
competitor_idandsectorthat describe a single athlete. The easiest way to create such a data frame is through the functionsquery_athletes(),query_race(), orquery_standings(). These functions can return multiple athletes, butquery_results()only returns the results for one athlete. If multiple athletes are passed, only the first one will be used.- category
abbreviation of the category of the race, e.g., "WC" for "World Cup". See the dataset categories for possible values.
- discipline
abbreviation for the discipline, e.g., "DH" for "Downhill". See the dataset disciplines for possible values.
- by
variables to groups the results by. Possible values are "category", and "discipline". Values are partially matched. Set this value to an empty vector (
c()) orNAto summarise without grouping.- type
which type of debut to get: the first race ("race"), the first podium ("podium"), or the first victory ("victory").
Value
A tibble with the following columns: athlete, date, place, nation,
sector, category, discipline, rank, fis_points, cup_points,
and race_id.
Examples
if (FALSE) { # \dontrun{
# get Marco Odermatt's World Cup debuts by discipline
odermatt <- query_athletes("odermatt", "marco")
get_debuts(odermatt, category = "WC")
# get first victory by category
get_debuts(odermatt, by = "category", type = "victory")
} # }
