sportsdataverse / cfbfastR

An R package to quickly obtain clean and tidy college football play by play data
https://cfbfastR.sportsdataverse.org
Other
74 stars 8 forks source link

cfbd_player_usage(2022,NULL,NULL,NULL,player_id,FALSE) #85

Open supernole1 opened 1 year ago

supernole1 commented 1 year ago

Describe the bug cfbd_player_usage() when passing an athlete_id number and year to this function it returns all players from that year. If passing it the Team identifier along with athlete_id, it returns all players from that team. So it seems the team is being handled correctly but its essentially ignoring the athlete_id variable that's being passed.

To Reproduce Steps to reproduce the behavior:

  1. cfbd_player_usage(2022, "Clemson", NULL, NULL, 4430518, FALSE)

Expected behavior

1 2022 4430518 Brannon S~ WR Clem~ ACC 0.0265 0.055 0 0.0281 0.028 0.022 0.024 0.025 **Actual Behavior** 1 2022 4429020 D.J. Uia~ QB Clem~ ACC 0.571 0.922 0.245 0.537 0.507 0.748 0.458 0.697 2 2022 4431545 Will Shi~ RB Clem~ ACC 0.250 0.0906 0.399 0.302 0.227 0.178 0.301 0.134 3 2022 4431562 Phil Maf~ RB Clem~ ACC 0.117 0.0291 0.199 0.119 0.161 0.037 0.12 0.109 4 2022 5081432 Antonio ~ WR Clem~ ACC 0.0655 0.123 0.0121 0.0632 0.057 0.081 0.048 0.08 5 2022 4426426 Joseph N~ WR Clem~ ACC 0.0577 0.120 0 0.0667 0.047 0.059 0.036 0.065 6 2022 4685413 Cade Klu~ QB Clem~ ACC 0.0499 0.0712 0.0302 0.0281 0.066 0.074 0.072 0.06 7 2022 4426553 Davis Al~ TE Clem~ ACC 0.0499 0.104 0 0.0561 0.024 0.081 0.018 0.065 8 2022 4431210 Beaux Co~ WR Clem~ ACC 0.0468 0.0971 0 0.0281 0.052 0.074 0.036 0.08 9 2022 4686095 Kobe Pace RB Clem~ ACC 0.0421 0.0227 0.0604 0.0421 0.052 0.03 0.042 0.045 10 2022 4431196 Jake Bri~ TE Clem~ ACC 0.0281 0.0583 0 0.0281 0.024 0.037 0.024 0.03 **Screenshots** If applicable, add screenshots to help explain your problem. **Desktop (please complete the following information):** - OS: Windows 10 - Browser; N/A - vRStudio 2022.07.1+554 **Smartphone (please complete the following information):** N/A **Additional context** Add any other context about the problem here.