View source: R/do_filter_data.R
| do_filter_data | R Documentation |
Filter the shooting data with the team or player of interest, and also by periods, minutes and game place. If neither team nor player is given, the data from the whole league is used.
do_filter_data(data_shots_zones, season_str, team, period, minute_vect, place, player)
data_shots_zones |
Shooting data with the court zones. |
season_str |
String with the season. |
team |
String with the team's full name. Nothing to filter if "". |
period |
Number with the periods (1, 2, 3 and 4 for the common four quarters, 5 for the first overtime and 6 for the second overtime). Nothing to filter if "". |
minute_vect |
Vector with the minutes to filter by. Nothing to filter if "". |
place |
String. If "Home" or "Casa", the local games are filtered. Nothing to filter if "". |
player |
String with the player's name. Nothing to filter if "". |
A data frame with the filters applied.
Guillermo Vinue
do_divide_court_zones
## Not run:
df0 <- do_divide_court_zones(acb_shooting_data_2425)
# Data for the whole league:
df1 <- do_filter_data(df0, "2024-2025", "", "", "", "", "")
# Data for a team:
df1 <- do_filter_data(df0, "2024-2025", "UCAM Murcia", "", "", "", "")
# Data for a player:
df1 <- do_filter_data(df0, "2024-2025", "", "", "", "", "D. Ennis")
# Other filters:
# By minutes:
df1 <- do_filter_data(df0, "2024-2025", "", "", c(8,10), "", "D. Ennis")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.