
Flag if the shot attempt is a rebound attempt or not for all the shots in a play-by-play
Source:R/Clean.R
flag_is_rebound.Rdflag_is_rebound() flags if the shot attempt is a rebound attempt or not
for all the shots in a play-by-play.
Arguments
- play_by_play
data.frame of play-by-play(s); see
gc_play_by_play()and/orwsc_play_by_play()for reference; must be untouched by non-nhlscraper functions; saves time ifflag_is_home()and/or
Examples
# May take >5s, so skip.
# \donttest{
test <- gc_play_by_play()
test_is_home_flagged <- flag_is_home(test)
test_game_id_stripped <- strip_game_id(test_is_home_flagged)
test_time_period_stripped <- strip_time_period(test_game_id_stripped)
test_is_rebound_flagged <- flag_is_rebound(test_time_period_stripped)
# }