lbenz730 / ncaahoopR

An R package for working with NCAA Basketball Play-by-Play Data
MIT License
198 stars 48 forks source link

Error in avgWP and GEI #112

Closed marcusSasser closed 10 months ago

marcusSasser commented 10 months ago

Have noticed that when trying to find average win probability or GEI for games involving teams with parenthesis states in their name it returns an error. For example, St. Francis since their ESPN name is St. Francis (PA). An explicit example would be when Tennessee Tech played Bethel (TN) it returns an error for average_win_prob, citing "Error in if (extra_parse & (pbp$date[1] >= "2007-11-01")) { : missing value where TRUE/FALSE needed". Usually WP is the error, but it can sometimes be for GEI as well, with game_excitement_index for Marshall vs Miami (OH) returning "Error in if (timeout$team[j] == home) { : argument is of length zero". Not sure if the error is the same or not every time, but the consistent part is having (state abbreviation) in your name somewhere.

lbenz730 commented 10 months ago

Thank you for alerting me. I'll look into this shortly.

lbenz730 commented 10 months ago

Should now be fixed in latest dev version. Let me know if your issue persists. Thanks!