Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gameplan function error #1

Closed
mcoleman9221 opened this issue Jan 28, 2021 · 8 comments
Closed

gameplan function error #1

mcoleman9221 opened this issue Jan 28, 2021 · 8 comments
Labels
bug Something isn't working

Comments

@mcoleman9221
Copy link

Describe the bug
get_gameplan function kicks an error:

get_gameplan(browser, "Iowa", year = 2020)
Error in manip_at(.tbl, .vars, .funs, enquo(.funs), caller_env(), .include_group_vars = TRUE, :
argument ".funs" is missing, with no default

To Reproduce
Steps to reproduce the behavior:

  1. run get_gameplan with any team in 2020 / 2021, returns same error

Expected behavior
Expect function to return data table

@saiemgilani
Copy link
Collaborator

I believe you need to call team='Iowa' and check to make sure your package is current. Next update will bring the package to 0.1.0

get_gameplan(browser, team='Iowa', year=2020)
[[1]]
         Date Opponent.Rk         Opponent    Result Location Pace Off.Eff Off.Eff.Rk Off.eFG.Pct Off.TO.Pct Off.OR.Pct Off.FTR
1  2019-11-08         338 SIU Edwardsville  W, 87-60        H   73   119.1          6        53.6       16.4       32.4    57.1
2  2019-11-11          91           DePaul  L, 93-78        H   82    94.7         20        48.2       23.1       21.6    57.1
3  2019-11-15         135     Oral Roberts  W, 87-74        H   73   120.0          4        52.9       11.0       40.5    38.2
4  2019-11-21         167    North Florida  W, 83-68        H   68   122.7          6        48.6        8.9       43.5    27.8
5  2019-11-24         315         Cal Poly  W, 85-59        H   72   118.8          5        58.8       15.4       35.3    50.9
6  2019-11-28          18       Texas Tech  W, 72-61        N   73    98.3          9        50.9       19.1       14.3    33.9
7  2019-11-29           5    San Diego St.  L, 83-73        N   68   107.7          5        48.2       20.7       38.2    35.1
8  2019-12-03          55         Syracuse  W, 68-54        A   64   105.5         14        51.6       18.6       32.4    13.1
9  2019-12-06          15         Michigan L, 103-91        A   74   122.5          4        49.3        9.4       36.6    32.4
10 2019-12-09          27        Minnesota  W, 72-52        H   65   111.2          6        50.8       12.4       28.9    22.9
11 2019-12-12          92         Iowa St.  W, 84-68        A   69   121.0          5        50.8       15.8       40.5    30.8
12 2019-12-21          45       Cincinnati  W, 77-70        N   78    98.8         13        57.0       30.8       32.3    60.0
13 2019-12-29         352     Kennesaw St.  W, 93-51        H   71   130.7          4        64.6        9.8       29.0    27.7
14 2020-01-04          26         Penn St.  L, 89-86        a   75   114.0          4        56.1       19.9       36.8    30.8
15 2020-01-07         162         Nebraska  L, 76-70        A   71    98.8         24        44.2       15.5       40.4     6.5
16 2020-01-10          11         Maryland  W, 67-49        H   70    95.6         15        45.1       25.7       39.5    22.9
17 2020-01-14         132     Northwestern  W, 75-62        A   64   117.1          8        56.4       10.9       17.9    27.3
18 2020-01-17          15         Michigan  W, 90-83        H   73   123.6          2        59.4       20.6       32.1    56.6
19 2020-01-22          24          Rutgers  W, 85-80        H   71   119.0          2        60.9       21.0       35.5    45.5
20 2020-01-27          21        Wisconsin  W, 68-62        H   70    96.8         14        35.8       12.8       29.6    53.3
21 2020-01-30          11         Maryland  L, 82-72        A   70   102.5         11        42.0       11.4       30.4    24.6
22 2020-02-02          30         Illinois  W, 72-65        H   63   114.9          6        60.0       20.8       31.0    34.0
23 2020-02-05          23           Purdue L, 104-68        A   68    99.4         14        48.1       20.5       29.0    38.9
24 2020-02-08         162         Nebraska  W, 96-72        H   74   129.1          2        56.2       10.8       34.2    23.6
25 2020-02-13          33          Indiana  L, 89-77        A   77   100.6         11        53.9       23.5       23.3    51.9
26 2020-02-16          27        Minnesota  W, 58-55        A   66    88.3         24        44.6       18.3       25.0    25.0
27 2020-02-20           9         Ohio St.  W, 85-76        H   70   121.9          2        65.4       14.3       17.2    48.1
   Off.FGM_2 Off.FGA_2 Off.FG_2.Pct Off.FGM_3 Off.FGA_3 Off.FG_3.Pct Off.FG_3A.Pct Def.Eff Def.Eff.Rk Def.eFG.Pct Def.TO.Pct
1         18        31         58.1         8        25         32.0          44.6    82.1          7        45.2       24.6
2         18        38         47.4         6        18         33.3          32.1   112.9         28        71.0       25.5
3         24        44         54.5         8        24         33.3          35.3   102.0         10        49.2       16.6
4         26        50         52.0         6        22         27.3          30.6   100.5          8        49.2       16.3
5         23        41         56.1         7        16         43.8          28.1    82.5          8        39.2       19.6
6         12        29         41.4        11        27         40.7          48.2    83.3          3        36.1       15.0
7         14        34         41.2         9        23         39.1          40.4   122.5         24        62.5       22.1
8         15        27         55.6        11        34         32.4          55.7    83.8          2        42.3       24.8
9         32        59         54.2         3        15         20.0          20.3   138.7         31        63.8       12.1
10        16        40         40.0        10        21         47.6          34.4    80.3          2        42.1       23.2
11        18        37         48.6        10        28         35.7          43.1    98.0         12        46.4       15.8
12        12        26         46.2        11        24         45.8          48.0    89.9          4        38.9        9.0
13        33        49         67.3         6        16         37.5          24.6    71.7          7        39.8       33.7
14        20        39         51.3        11        26         42.3          40.0   117.9         25        51.4       10.6
15        28        44         63.6         4        33         12.1          42.9   107.2         27        58.5       15.5
16        14        38         36.8         9        23         39.1          37.7    69.9          1        36.5       24.3
17        16        33         48.5        10        22         45.5          40.0    96.8         15        40.5       14.1
18        18        37         48.6         9        16         56.2          30.2   114.0         24        58.1       11.0
19        20        30         66.7         9        25         36.0          45.5   112.0         22        51.6       12.6
20        17        40         42.5         3        20         15.0          33.3    88.3          6        43.8       12.8
21        17        45         37.8         8        24         33.3          34.8   116.8         22        51.8       14.2
22        15        27         55.6        10        23         43.5          46.0   103.8         18        48.3       20.8
23        17        29         58.6         6        25         24.0          46.3   152.1         31        77.7       13.2
24        24        44         54.5        11        28         39.3          38.9    96.8         20        46.2       16.1
25        22        38         57.9         4        14         28.6          26.9   116.3         25        54.9       22.2
26        19        43         44.2         4        13         30.8          23.2    83.8          6        41.5       19.8
27        19        27         70.4        10        25         40.0          48.1   109.0         17        49.2       20.1
   Def.OR.Pct Def.FTR Def.FGM_2 Def.FGA_2 Def.FG_2.Pct Def.FGM_3 Def.FGA_3 Def.FG_3.Pct Def.FG_3A.Pct WL TeamScore
1        22.9     6.5        22        44         50.0         4        18         22.2          29.0  W        87
2        20.0    35.1        24        37         64.9        11        20         55.0          35.1  L        78
3        25.0    18.5        20        42         47.6         8        23         34.8          35.4  W        87
4        24.3    16.4        12        32         37.5        12        29         41.4          47.5  W        83
5        24.4    13.8        21        43         48.8         3        22         13.6          33.8  W        85
6        24.4    36.1        16        37         43.2         4        24         16.7          39.3  W        72
7        33.3    36.5        16        28         57.1        11        24         45.8          46.2  L        73
8        30.6    28.9        13        31         41.9         6        21         28.6          40.4  W        68
9        44.4    58.6        22        34         64.7        10        24         41.7          41.4  L        91
10       28.9    14.0        15        32         46.9         6        25         24.0          43.9  W        72
11       35.7    10.1        23        43         53.5         6        26         23.1          37.7  W        84
12       20.8    25.0        19        48         39.6         6        24         25.0          33.3  W        77
13       34.3    18.5        14        36         38.9         5        18         27.8          33.3  W        93
14       34.1    30.6        25        44         56.8         8        28         28.6          38.9  L        86
15       17.1    49.1        16        27         59.3        10        26         38.5          49.1  L        70
16       23.7    38.5        13        30         43.3         4        22         18.2          42.3  W        67
17       32.5    36.2        16        41         39.0         5        17         29.4          29.3  W        75
18       17.1     7.3        23        34         67.6        11        34         32.4          50.0  W        90
19       27.0    33.3        22        42         52.4         7        21         33.3          33.3  W        85
20       21.4    17.2        16        36         44.4         8        28         28.6          43.8  W        68
21       29.4    45.6        19        32         59.4         7        25         28.0          43.9  L        72
22       37.1    19.0        16        36         44.4         8        22         36.4          37.9  W        72
23       40.0    12.3        22        31         71.0        19        34         55.9          52.3  L        68
24       27.5    21.2        23        41         56.1         5        25         20.0          37.9  W        96
25       43.2    52.5        17        40         42.5        11        21         52.4          34.4  L        77
26       28.6    20.3        14        34         41.2         7        25         28.0          42.4  W        58
27       36.8    29.0        17        32         53.1         9        30         30.0          48.4  W        85
   OpponentScore   Day.Date GameDate
1             60  Fri Nov 8 20191108
2             93 Mon Nov 11 20191111
3             74 Fri Nov 15 20191115
4             68 Thu Nov 21 20191121
5             59 Sun Nov 24 20191124
6             61 Thu Nov 28 20191128
7             83 Fri Nov 29 20191129
8             54  Tue Dec 3 20191203
9            103  Fri Dec 6 20191206
10            52  Mon Dec 9 20191209
11            68 Thu Dec 12 20191212
12            70 Sat Dec 21 20191221
13            51 Sun Dec 29 20191229
14            89  Sat Jan 4 20200104
15            76  Tue Jan 7 20200107
16            49 Fri Jan 10 20200110
17            62 Tue Jan 14 20200114
18            83 Fri Jan 17 20200117
19            80 Wed Jan 22 20200122
20            62 Mon Jan 27 20200127
21            82 Thu Jan 30 20200130
22            65  Sun Feb 2 20200202
23           104  Wed Feb 5 20200205
24            72  Sat Feb 8 20200208
25            89 Thu Feb 13 20200213
26            55 Sun Feb 16 20200216
27            76 Thu Feb 20 20200220
 [ reached 'max' / getOption("max.print") -- omitted 4 rows ]

[[2]]
     Correlations (R x 100) Pace Off.eFG.Pct Off.TO.Pct Off.OR.Pct Off.FTR Def.eFG.Pct Def.TO.Pct Def.OR.Pct Def.FTR
33 to offensive efficiency:  -11         +69        -54        +22      +1          -5         -3        +10     -32
34 to defensive efficiency:   +9          -4         +6         +5     +10         +87        -48        +40     +33

[[3]]
  Team   Category C.Pct PF.Pct SF.Pct SG.Pct PG.Pct C.Pct.Rk PF.Pct.Rk SF.Pct.Rk SG.Pct.Rk PG.Pct.Rk C.Pct.D1.Avg PF.Pct.D1.Avg
1 Iowa   % Points  35.0   18.5   15.7   15.1   15.6        1       218       319       313       310         19.9          19.8
2 Iowa % Off Rebs  42.9   24.3   13.4    9.1   10.2       80       232       239       212        91         36.9          27.4
3 Iowa % Def Rebs  31.1   26.2   20.7   10.5   11.3       39        88       111       348       303         26.3          23.8
  SF.Pct.D1.Avg SG.Pct.D1.Avg PG.Pct.D1.Avg
1          20.2          19.6          20.4
2          16.6          10.9           8.1
3          19.0          16.4          14.4

> get_gameplan(browser, team='Iowa', year=2021)
[[1]]
         Date Opponent.Rk               Opponent    Result Location Pace Off.Eff Off.Eff.Rk Off.eFG.Pct Off.TO.Pct Off.OR.Pct
1  2020-11-25         261 North Carolina Central  W, 97-67        H   69   140.7          1        56.1       13.1       54.0
2  2020-11-27         292               Southern W, 103-76        H   76   134.9          1        65.6       13.1       28.1
3  2020-12-03         330       Western Illinois  W, 99-58        H   83   119.7          3        52.9       13.3       32.5
4  2020-12-08          31         North Carolina  W, 93-80        H   79   118.4          1        55.9       14.0       30.4
5  2020-12-11         110               Iowa St. W, 105-77        H   72   145.7          1        62.5        9.7       43.8
6  2020-12-13         319      Northern Illinois W, 106-53        H   73   144.4          1        64.4       10.9       44.1
7  2020-12-19           2                Gonzaga  L, 99-88        N   85   103.7          4        49.3       14.1       28.3
8  2020-12-22          27                 Purdue  W, 70-55        H   65   108.5          4        53.6       17.0       25.7
9  2020-12-25          26              Minnesota L, 102-95        A   68   123.5          1        43.6        9.1       50.0
10 2020-12-29          71           Northwestern  W, 87-72        H   68   127.4          2        57.8       11.7       29.4
11 2021-01-02          39                Rutgers  W, 77-75        A   71   108.7          5        52.7       21.2       32.4
12 2021-01-07          43               Maryland  W, 89-67        A   74   119.7          3        63.4       14.8       18.2
13 2021-01-10          26              Minnesota  W, 86-71        H   72   119.0          3        63.4       13.8       17.2
14 2021-01-17          71           Northwestern  W, 96-73        A   72   134.3          1        66.7       12.6       25.0
15 2021-01-21          23                Indiana  L, 81-69        H   68   101.0          8        42.1       17.6       42.5
   Off.FTR Off.FGM_2 Off.FGA_2 Off.FG_2.Pct Off.FGM_3 Off.FGA_3 Off.FG_3.Pct Off.FG_3A.Pct Def.Eff Def.Eff.Rk Def.eFG.Pct
1     43.9        22        36         61.1        10        30         33.3          45.5    97.2          3        47.4
2     50.8        22        37         59.5        12        24         50.0          39.3    99.5          7        43.6
3     47.1        25        47         53.2         8        23         34.8          32.9    70.1          1        33.8
4     18.4        17        36         47.2        17        40         42.5          52.6   101.8          6        52.3
5     35.3        26        39         66.7        11        29         37.9          42.6   106.8          9        53.9
6     24.7        29        43         67.4        12        30         40.0          41.1    72.2          2        35.7
7     34.7        31        53         58.5         4        22         18.2          29.3   116.6          4        60.7
8     25.0        12        22         54.5        12        34         35.3          60.7    85.2          4        46.5
9     48.7        19        48         39.6        10        30         33.3          38.5   132.6         15        57.5
10    43.1        17        32         53.1        11        26         42.3          44.8   105.4          7        53.4
11    41.1        19        38         50.0         7        18         38.9          32.1   105.9          7        50.0
12     9.0        23        41         56.1        13        26         50.0          38.8    90.1          4        53.3
13    37.5        22        42         52.4         9        14         64.3          25.0    98.2          5        42.2
14    45.6        23        33         69.7        10        24         41.7          42.1   102.1          6        48.5
15    33.3        19        40         47.5         5        23         21.7          36.5   118.6         14        56.6
   Def.TO.Pct Def.OR.Pct Def.FTR Def.FGM_2 Def.FGA_2 Def.FG_2.Pct Def.FGM_3 Def.FGA_3 Def.FG_3.Pct Def.FG_3A.Pct WL TeamScore
1        21.8       31.4    29.8        18        38         47.4         6        19         31.6          33.3  W        97
2        20.9       41.3    27.1        20        49         40.8         7        21         33.3          30.0  W       103
3        16.9       27.9    12.5        18        49         36.7         6        31         19.4          38.8  W        99
4        22.9       38.5    30.8        25        50         50.0         6        15         40.0          23.1  W        93
5        23.6       36.8    15.6        15        32         46.9        13        32         40.6          50.0  W       105
6        24.5       40.0    12.9        22        55         40.0         2        15         13.3          21.4  W       106
7        21.2       40.0    34.3        23        44         52.3        13        26         50.0          37.1  L        88
8        21.7       24.3     5.2        15        33         45.5         8        25         32.0          43.1  W        70
9        10.4       28.2    43.3        13        24         54.2        17        43         39.5          64.2  L        95
10       17.6       23.5    20.3        15        34         44.1        11        25         44.0          42.4  W        87
11       14.1       35.6    16.9        22        48         45.8         9        23         39.1          32.4  W        77
12       21.5       13.9    10.0        14        25         56.0        12        35         34.3          58.3  W        89
13        9.7       25.0    22.5        15        37         40.5        10        34         29.4          47.9  W        86
14        8.4       15.4    21.5        18        32         56.2         9        33         27.3          50.8  W        96
15       11.7       23.7    66.0        18        36         50.0         8        17         47.1          32.1  L        69
   OpponentScore   Day.Date GameDate
1             67 Wed Nov 25 20201125
2             76 Fri Nov 27 20201127
3             58  Thu Dec 3 20201203
4             80  Tue Dec 8 20201208
5             77 Fri Dec 11 20201211
6             53 Sun Dec 13 20201213
7             99 Sat Dec 19 20201219
8             55 Tue Dec 22 20201222
9            102 Fri Dec 25 20201225
10            72 Tue Dec 29 20201229
11            75  Sat Jan 2 20210102
12            67  Thu Jan 7 20210107
13            71 Sun Jan 10 20210110
14            73 Sun Jan 17 20210117
15            81 Thu Jan 21 20210121

[[2]]
     Correlations (R x 100) Pace Off.eFG.Pct Off.TO.Pct Off.OR.Pct Off.FTR Def.eFG.Pct Def.TO.Pct Def.OR.Pct Def.FTR
17 to offensive efficiency:  -10         +66        -71        +36     +20         -36        +29        +18     -32
18 to defensive efficiency:  -19         -51         -4        +23     +27         +85        -42         +2     +71

[[3]]
  Team   Category C.Pct PF.Pct SF.Pct SG.Pct PG.Pct C.Pct.Rk PF.Pct.Rk SF.Pct.Rk SG.Pct.Rk PG.Pct.Rk C.Pct.D1.Avg PF.Pct.D1.Avg
1 Iowa   % Points  31.9   21.9   16.6   14.0   15.5        3        85       274       331       291         20.1          19.6
2 Iowa % Off Rebs  44.4   29.7   16.6    5.5    3.7       48       128       168       309       309         35.7          27.3
3 Iowa % Def Rebs  27.3   26.2   23.3    8.3   14.8      131        98        58       346       138         26.1          23.6
  SF.Pct.D1.Avg SG.Pct.D1.Avg PG.Pct.D1.Avg
1          19.7          20.2          20.3
2          16.9          11.5           8.4
3          19.4          16.4          14.4

@saiemgilani saiemgilani added the bug Something isn't working label Jan 28, 2021
@mcoleman9221
Copy link
Author

Thanks Saiem - weird I tried reinstalling the package and adding 'team = ', but still getting same error. Not having problems with other functions either.

`> get_gameplan(browser,"Iowa", year = 2020)
Error in manip_at(.tbl, .vars, .funs, enquo(.funs), caller_env(), .include_group_vars = TRUE, :
argument ".funs" is missing, with no default

get_gameplan(browser,team="Iowa", year = 2021)
Error in manip_at(.tbl, .vars, .funs, enquo(.funs), caller_env(), .include_group_vars = TRUE, :
argument ".funs" is missing, with no default
get_team_players(browser,"Iowa",year_input)
Role Number Player Ht Wt Yr G S Minpct ORtg Posspct Shotspct
1 Go-to Guys 55 Luka Garza 1 6-11 265 Sr 15 15 75.0 133.4 30.8 33.5
2 Major Contributor 1 Joe Toussaint 6-0 190 So 15 NA 31.6 93.6 25.3 19.4
3 Significant Contributor 10 Joe Wieskamp 6-6 212 Jr 15 15 67.4 118.9 21.8 22.7
4 Significant Contributor 2 Jack Nunge 6-11 245 So 13 NA 34.5 113.9 23.5 22.4
5 Role Player 3 Jordan Bohannon 6-1 175 Sr 15 15 69.9 121.0 16.7 18.1
6 Role Player 15 Keegan Murray 6-8 215 Fr 15 NA 36.4 120.7 18.4 18.0
7 Significant Contributor 22 Patrick McCaffery 6-9 200 Fr 15 NA 36.2 111.4 20.0 20.6
8 Role Player 4 Ahron Ulis 6-3 190 Fr 9 NA 11.2 135.9 16.9 8.2
9 Limited Role 5 CJ Fredrick 6-3 195 So 15 15 63.0 139.2 12.9 15.4
10 Nearly Invisible 30 Connor McCaffery 6-5 205 Jr 15 15 55.9 125.2 11.1 8.0
11 Benchwarmer 11 Tony Perkins 6-4 210 Fr 10 NA 8.6 115.1 18.4 20.2
12 Benchwarmer 20 Kris Murray 6-8 215 Fr 8 NA 3.3 57.5 22.1 24.7
13 Benchwarmer 13 Austin Ash 6-3 179 Jr 5 NA 2.3 126.6 28.1 44.1
eFGpct TSpct ORpct DRpct ARate TORate Blkpct Stlpct FCper40 FDper40 FTRate FTM-A FTpct 2PM-A
1 65.8 68.2 12.0 17.9 12.0 9.8 6.1 0.8 2.8 6.9 43.1 80-106 0.755 126-194
2 41.7 47.1 2.3 6.6 29.2 26.1 0.5 4.6 5.9 4.8 46.7 19-28 0.679 22-52
3 59.0 61.1 6.4 18.0 9.3 13.5 0.5 2.1 2.2 4.7 40.0 41-60 0.683 48-88
4 48.7 52.6 15.7 19.4 13.8 15.6 5.4 0.8 4.6 3.8 28.9 17-22 0.773 28-49
5 55.2 56.7 0.5 11.7 24.6 15.5 0.0 1.2 1.5 1.9 9.7 10-12 0.833 10-20
6 64.1 66.7 8.9 22.0 5.9 18.9 8.4 4.2 4.4 3.6 35.9 18-23 0.783 29-43
7 43.8 48.8 8.5 13.3 9.7 8.8 2.8 1.2 2.4 4.6 43.8 22-32 0.688 20-48
8 44.4 69.3 4.8 4.3 22.2 19.0 0.0 0.0 1.8 6.5 177.8 15-16 0.938 4-6
9 62.1 63.5 0.9 3.6 14.2 4.4 0.3 0.7 1.4 2.7 28.4 19-27 0.704 20-43
10 45.5 48.0 2.9 12.3 25.9 16.1 0.3 1.8 4.7 2.1 38.6 10-17 0.588 8-16
11 41.2 45.0 12.6 9.3 11.8 5.7 0.0 3.2 5.4 3.0 23.5 3-4 0.750 7-16
12 25.0 25.0 10.9 14.5 0.0 24.8 5.2 2.7 4.0 1.4 0.0 0-0 0.000 2-6
13 55.0 55.0 0.0 13.8 28.4 0.0 0.0 3.9 2.9 1.7 0.0 0-0 0.000 1-3
FG2pct 3PM-A FG3pct Team Year
1 0.649 24-52 0.462 Iowa 2021
2 0.423 2-8 0.250 Iowa 2021
3 0.545 27-62 0.435 Iowa 2021
4 0.571 6-27 0.222 Iowa 2021
5 0.500 39-104 0.375 Iowa 2021
6 0.674 8-21 0.381 Iowa 2021
7 0.417 8-25 0.320 Iowa 2021
8 0.667 0-3 0.000 Iowa 2021`

@saiemgilani
Copy link
Collaborator

For re-install:

  1. remove package from packages tab (aka uninstall)
  2. restart R by going to Session -> Restart R
  3. Then do devtools::install_github(repo = "saiemgilani/kenpomR")

For browser function:

  1. First try to make sure that your browser variables are set correctly with
    Sys.setenv(kp_user="your email here")
    and
    Sys.setenv(kp_pw="your password here")
  2. then try
browser <- login(Sys.getenv("kp_user"),Sys.getenv("kp_pw"))
get_gameplan(browser, team='Iowa', year=2021)

If that doesn't work for you, I'm afraid it might be something about how default settings (possibly OS) interprets characters or something. Let me know how that goes, otherwise I might need to look into it

@mcoleman9221
Copy link
Author

Gotcha thanks - yeah I've used the whole package (browser setup w/ variables etc.) pretty consistently with no problems except with this function which is why I submitted the bug. Will take another run at full reinstall and see if it fixes though.

Thanks!

@mcoleman9221
Copy link
Author

Update: running into same issue after full reinstall and resetting the renviron passwords etc. Other functions still working as usual.

Not sure if it has to do with running windows (we chatted on twitter awhile back about getting that setup and it was a little different on PC) but my comp doesn't seem to like that function for some reason. Thought maybe it had to do with dplyr version, but I'm up to 1.0.2 there as well.

Let me know if you have other ideas, thanks again.

@mcoleman9221
Copy link
Author

mcoleman9221 commented Feb 10, 2021

Hey Saiem - saw the package went to 0.1.0 -- went through and reinstalled and tried to the get_gameplan function again and am getting a different error now haha. All other functions are still working, so not sure why this one is having problems but would love to use it for a project I'm working on. Let me know if you have any other ideas of how to fix outside of the uninstall.

get_gameplan(browser,"Wisconsin", year = 2021)
Warning: Unknown or uninitialised column: Year.
Error: Must subset rows with a valid subscript vector.
i Logical subscripts must match the size of the indexed input.
x Input has size 357 but subscript kenpomR::teams_links$Year == year has size 0.

@saiemgilani
Copy link
Collaborator

oh, interesting. This one sounds fixable at least. I think I just need to update the teams links data. I'll look into this one but it feels like an easy solve
come join us in the cfbscrapR discord (where we talk all types of scraping what have yous):
https://discord.gg/HaWQfwfp

@saiemgilani
Copy link
Collaborator

 get_gameplan(browser,"Wisconsin", year = 2021)
[[1]]
         Date Opponent.Rk            Opponent   Result Location Pace Off.Eff Off.Eff.Rk
1  2020-11-25         295    Eastern Illinois W, 77-67        H   70   109.3         10
2  2020-11-27         351 Arkansas Pine Bluff W, 92-58        H   71   128.8          5
3  2020-12-01         237           Green Bay W, 82-42        H   66   125.2          2
4  2020-12-04          84           Marquette L, 67-65        A   63   102.9         11
5  2020-12-09          76        Rhode Island W, 73-62        H   71   102.8          5
6  2020-12-15           9      Loyola Chicago W, 77-63        H   68   114.1          1
7  2020-12-19          51          Louisville W, 85-48        H   65   130.8          2
8  2020-12-22         117            Nebraska W, 67-53        H   66   101.4         11
9  2020-12-25          64        Michigan St. W, 85-76        A   68   124.2          3
10 2020-12-28          33            Maryland L, 70-64        H   63   101.4         10
11 2020-12-31          53           Minnesota W, 71-59        H   64   110.5         10
12 2021-01-07          30             Indiana W, 80-73        H   60   106.5          8
13 2021-01-12           3            Michigan L, 77-54        A   65    83.2         15
14 2021-01-15          23             Rutgers W, 60-54        A   64    93.5         14
15 2021-01-20          67        Northwestern W, 68-52        H   61   111.0          7
16 2021-01-23           8            Ohio St. L, 74-62        H   67    92.1         18
17 2021-01-27          33            Maryland W, 61-55        A   63    96.4         16
18 2021-01-30          37            Penn St. L, 81-71        A   71    99.5         10
19 2021-02-02          37            Penn St. W, 72-56        H   62   115.8          6
20 2021-02-06           4            Illinois L, 75-60        A   72    83.2         17
21 2021-02-10         117            Nebraska W, 61-48        A   67    90.9         14
22 2021-02-14           3            Michigan L, 67-59        H   62    94.9          6
23 2021-02-18           5                Iowa L, 77-62        H   64    97.1         17
   Off.eFG.Pct Off.TO.Pct Off.OR.Pct Off.FTR Off.FGM_2 Off.FGA_2 Off.FG_2.Pct Off.FGM_3
1         48.2        9.9       22.9    50.9        17        34         50.0         7
2         61.0        9.8       21.9    45.8        21        40         52.5        10
3         63.1       15.3       33.3     9.8        25        41         61.0         9
4         43.8       15.8       34.2    33.9        14        32         43.8         7
5         45.2       12.7       20.0    69.2        13        30         43.3         7
6         52.6        5.9       17.6    40.4        15        39         38.5        10
7         68.4       15.4       25.0    19.3        15        32         46.9        16
8         47.3       16.6       19.4    27.3        14        29         48.3         8
9         60.8       10.2       19.2    58.8        19        32         59.4         8
10        50.9       11.1       20.0    27.3        16        34         47.1         8
11        55.9       14.0       25.8    13.6        24        44         54.5         6
12        48.5        9.3       23.1    30.3        20        47         42.6         8
13        37.7       15.4       26.1     9.2        11        37         29.7         9
14        40.7       14.0       21.1    38.9        13        29         44.8         6
15        52.7       13.1       20.7    20.0        14        28         50.0        10
16        46.5       14.8       18.9    26.3        16        29         55.2         7
17        48.2       19.0       20.6    12.5        12        30         40.0        10
18        49.2       16.8       26.3    12.1        22        38         57.9         7
19        56.7       24.1       44.4    30.8        16        34         47.1         9
20        45.0       15.3        5.4    18.3        21        36         58.3         4
21        39.5       11.9       23.3    27.4        11        30         36.7         9
22        44.4       16.1       21.9    22.2        15        35         42.9         6
23        39.3        7.8       33.3    17.1         8        36         22.2        13
   Off.FGA_3 Off.FG_3.Pct Off.FG_3A.Pct Def.Eff Def.Eff.Rk Def.eFG.Pct Def.TO.Pct Def.OR.Pct
1         23         30.4          40.4    95.1         10        39.4       15.6       30.9
2         19         52.6          32.2    81.2          7        39.6       21.0       18.9
3         20         45.0          32.8    64.1          1        30.7       15.3       16.3
4         24         29.2          42.9   106.1         15        48.0       17.4       28.1
5         22         31.8          42.3    87.3          4        46.1       19.7       20.0
6         18         55.6          31.6    93.3          3        47.2       20.7       21.2
7         25         64.0          43.9    73.9          1        41.5       27.7       20.7
8         26         30.8          47.3    80.2          6        40.7       13.6       15.0
9         19         42.1          37.3   111.1         14        54.4       20.5       28.1
10        21         38.1          38.2   110.9         15        55.8       14.3       15.4
11        15         40.0          25.4    91.9          5        36.7       15.6       36.4
12        19         42.1          28.8    97.1          5        54.8       17.3        6.2
13        28         32.1          43.1   118.7          9        58.9       12.3       26.7
14        25         24.0          46.3    84.2          2        38.8       20.3       42.5
15        27         37.0          49.1    84.9          4        48.0       16.3       12.5
16        28         25.0          49.1   109.9          8        55.7       16.3       17.9
17        26         38.5          46.4    86.9          4        44.3       14.2       11.4
18        28         25.0          42.4   113.5         14        51.7        8.4       19.4
19        18         50.0          34.6    90.1          5        43.9       20.9       35.1
20        24         16.7          40.0   104.0          8        57.5       25.0       39.3
21        32         28.1          51.6    71.6          1        41.8       25.3       22.2
22        19         31.6          35.2   107.8          5        46.6        9.7       30.6
23        34         38.2          48.6   120.6         11        62.8       17.2       25.9
   Def.FTR Def.FGM_2 Def.FGA_2 Def.FG_2.Pct Def.FGM_3 Def.FGA_3 Def.FG_3.Pct Def.FG_3A.Pct WL
1     22.7        17        47         36.2         6        19         31.6          28.8  W
2     39.6        12        39         30.8         6        14         42.9          26.4  W
3     22.8        13        40         32.5         3        17         17.6          29.8  W
4     57.1        16        35         45.7         5        14         35.7          28.6  L
5     49.0        19        38         50.0         3        13         23.1          25.5  W
6     31.5        12        28         42.9         9        26         34.6          48.1  W
7     25.5        12        33         36.4         5        14         35.7          29.8  W
8     31.5        10        27         37.0         8        27         29.6          50.0  W
9     28.1        19        46         41.3         8        11         72.7          19.3  W
10    28.9        20        35         57.1         6        17         35.3          32.7  L
11    21.9        13        33         39.4         7        31         22.6          48.4  W
12    12.9        22        41         53.7         8        21         38.1          33.9  W
13     6.5        23        46         50.0         9        16         56.2          25.8  L
14    10.4        23        48         47.9         2        19         10.5          28.4  W
15    13.7        14        28         50.0         7        23         30.4          45.1  W
16    34.0        22        37         59.5         5        16         31.2          30.2  L
17    17.0        10        23         43.5         9        30         30.0          56.6  W
18    41.7        19        36         52.8         8        24         33.3          40.0  L
19    17.5        16        33         48.5         6        24         25.0          42.1  W
20    39.6        23        37         62.2         5        16         31.2          30.2  L
21    34.7        13        34         38.2         5        15         33.3          30.6  W
22    27.1        17        42         40.5         7        17         41.2          28.8  L
23    37.2        14        32         43.8        12        19         63.2          37.3  L
   TeamScore OpponentScore   Day.Date GameDate
1         77            67 Wed Nov 25 20201125
2         92            58 Fri Nov 27 20201127
3         82            42  Tue Dec 1 20201201
4         65            67  Fri Dec 4 20201204
5         73            62  Wed Dec 9 20201209
6         77            63 Tue Dec 15 20201215
7         85            48 Sat Dec 19 20201219
8         67            53 Tue Dec 22 20201222
9         85            76 Fri Dec 25 20201225
10        64            70 Mon Dec 28 20201228
11        71            59 Thu Dec 31 20201231
12        80            73  Thu Jan 7 20210107
13        54            77 Tue Jan 12 20210112
14        60            54 Fri Jan 15 20210115
15        68            52 Wed Jan 20 20210120
16        62            74 Sat Jan 23 20210123
17        61            55 Wed Jan 27 20210127
18        71            81 Sat Jan 30 20210130
19        72            56  Tue Feb 2 20210202
20        60            75  Sat Feb 6 20210206
21        61            48 Wed Feb 10 20210210
22        59            67 Sun Feb 14 20210214
23        62            77 Thu Feb 18 20210218

[[2]]
     Correlations (R x 100) Pace Off.eFG.Pct Off.TO.Pct Off.OR.Pct Off.FTR Def.eFG.Pct
25 to offensive efficiency:   +1         +91        -14        +29     +28         -48
26 to defensive efficiency:   +0         -43        -12         -5      -6         +84
   Def.TO.Pct Def.OR.Pct Def.FTR
25        +28        -20      -1
26        -42        +18     +14

[[3]]
       Team   Category C.Pct PF.Pct SF.Pct SG.Pct PG.Pct C.Pct.Rk PF.Pct.Rk SF.Pct.Rk SG.Pct.Rk
1 Wisconsin   % Points  27.2   16.3   18.1   16.4   21.9       21       283       231       299
2 Wisconsin % Off Rebs  36.7   22.7   27.3   10.1    3.1      150       260        22       185
3 Wisconsin % Def Rebs  24.2   23.0   20.9   15.4   16.4      222       197       114       198
  PG.Pct.Rk C.Pct.D1.Avg PF.Pct.D1.Avg SF.Pct.D1.Avg SG.Pct.D1.Avg PG.Pct.D1.Avg
1       124         20.1          19.6          19.7          20.2          20.4
2       332         35.9          27.3          16.8          11.5           8.5
3        78         26.1          23.7          19.4          16.4          14.3


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants