Learn R Programming

nhlscraper (version 0.4.1)

flag_is_home: Flag if the event belongs to the home team or not for all the events (plays) in a play-by-play

Description

flag_is_home() flags if the event belongs to the home team or not for all the events (plays) in a play-by-play.

Usage

flag_is_home(play_by_play)

Value

data.frame with one row per event (play) and added isHome column

Arguments

play_by_play

data.frame of play-by-play(s); see gc_play_by_play() and/or wsc_play_by_play() for reference; must be untouched by non-nhlscraper functions

Examples

Run this code
# May take >5s, so skip.
# \donttest{
  test                 <- gc_play_by_play()
  test_is_home_flagged <- flag_is_home(test)
# }

Run the code above in your browser using DataLab