do_stats {BAwiR} | R Documentation |
Accumulated or average statistics
Description
This function computes either the total or the average statistics.
Usage
do_stats(df_games, type_stats = "Total", season, competition, type_season)
Arguments
df_games |
Data frame with the games, players info, advanced stats and eventually recoded teams names. |
type_stats |
String. In English, the options are "Total" and "Average" and in Spanish, the options are "Totales" and "Promedio". |
season |
String indicating the season, for example, 2017-2018. |
competition |
String. Options are "ACB", "Euroleague" and "Eurocup". |
type_season |
String with the round of competition, for example regular season or playoffs and so on. |
Value
Data frame.
Author(s)
Guillermo Vinue
Examples
compet <- "ACB"
df <- do_join_games_bio(compet, acb_games_1718, acb_players_1718)
df1 <- do_add_adv_stats(df)
df2 <- do_stats(df1, "Total", "2017-2018", compet, "Regular Season")
[Package BAwiR version 1.3.2 Index]