sportsdataverse / hoopR-data

hoopR data 2002-2021
7 stars 4 forks source link

all functions return "object 'kenpom' not found" #1

Closed dbaggot3 closed 1 year ago

dbaggot3 commented 1 year ago

Hi There,

I'm trying to use the hoopR package to do some data analysis in R, but every function that I try returns the error:

Error in kp_efficiency(2022) : object 'kenpom' not found

It looks like this same error comes up in the example codes of each function in the function index.

Is the fix for this issue on the user end? Thanks in advance for your help!

saiemgilani commented 1 year ago

Man I'm struggling with this one. Something has changed

andreweatherman commented 1 year ago

Yeah, I have no idea what's happening here, either. I think we mentioned this bug a few weeks back in Discord, and then I thought this was Windows-specific...but now everything is working fine on my Mac and PC (???). I can't seem to replicate this again with any function. Like unless @dbaggot3 is using a Mac, I still think this might be a bug that only affects Windows machines. When I ran into something similar with kp_team_history (which now magically works), I could only ever replicate it on my PC.

@dbaggot3 could you share your sessionInfo()?

For reference, here is mine where hoopR is working.

R version 4.2.1 (2022-06-23 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 22000)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.utf8  LC_CTYPE=English_United States.utf8   
[3] LC_MONETARY=English_United States.utf8 LC_NUMERIC=C                          
[5] LC_TIME=English_United States.utf8    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] hoopR_1.8.1     lubridate_1.8.0

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.9            pillar_1.8.1          compiler_4.2.1        tools_4.2.1          
 [5] digest_0.6.29         jsonlite_1.8.0        lifecycle_1.0.2       tibble_3.1.8         
 [9] pkgconfig_2.0.3       rlang_1.0.5           cli_3.3.0             rstudioapi_0.14      
[13] curl_4.3.2            parallel_4.2.1        fastmap_1.1.0         withr_2.5.0          
[17] furrr_0.3.1           dplyr_1.0.99.9000     httr_1.4.4            stringr_1.4.1        
[21] xml2_1.3.3            janitor_2.1.0         generics_0.1.3        vctrs_0.4.1.9000     
[25] htmlwidgets_1.5.4     globals_0.16.1        tidyselect_1.1.2.9000 reactable_0.3.0.9000 
[29] glue_1.6.2            snakecase_0.11.0      data.table_1.14.2     listenv_0.8.0        
[33] R6_2.5.1              fansi_1.0.3           parallelly_1.32.1     selectr_0.4-2        
[37] tidyr_1.2.0           purrr_0.3.4           magrittr_2.0.3        codetools_0.2-18     
[41] htmltools_0.5.3       rvest_1.0.3           future_1.28.0         utf8_1.2.2           
[45] stringi_1.7.8         RcppParallel_5.1.5  
dbaggot3 commented 1 year ago

Mac user here.

R version 4.2.0 (2022-04-22)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Monterey 12.3.1

Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRlapack.dylib

Random number generation:
 RNG:     Mersenne-Twister 
 Normal:  Inversion 
 Sample:  Rounding 

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] forcats_0.5.2   dplyr_1.0.10    purrr_0.3.4     readr_2.1.2     tidyr_1.2.0     tibble_3.1.8    ggplot2_3.3.6  
 [8] tidyverse_1.3.2 stringr_1.4.1   hoopR_1.8.0    

loaded via a namespace (and not attached):
 [1] tidyselect_1.1.2    janitor_2.1.0       listenv_0.8.0       haven_2.5.1         gargle_1.2.0       
 [6] snakecase_0.11.0    colorspace_2.0-3    vctrs_0.4.1         generics_0.1.3      utf8_1.2.2         
[11] rlang_1.0.5         pillar_1.8.1        withr_2.5.0         glue_1.6.2          DBI_1.1.3          
[16] dbplyr_2.2.1        readxl_1.4.1        modelr_0.1.9        lifecycle_1.0.1     munsell_0.5.0      
[21] gtable_0.3.1        cellranger_1.1.0    rvest_1.0.3         future_1.28.0       codetools_0.2-18   
[26] tzdb_0.3.0          curl_4.3.2          parallel_4.2.0      fansi_1.0.3         broom_1.0.1        
[31] furrr_0.3.1         Rcpp_1.0.9          backports_1.4.1     scales_1.2.1        googlesheets4_1.0.1
[36] RcppParallel_5.1.5  jsonlite_1.8.0      parallelly_1.32.1   fs_1.5.2            hms_1.1.2          
[41] digest_0.6.29       stringi_1.7.8       grid_4.2.0          cli_3.3.0           tools_4.2.0        
[46] magrittr_2.0.3      crayon_1.5.1        pkgconfig_2.0.3     ellipsis_0.3.2      data.table_1.14.2  
[51] xml2_1.3.3          reprex_2.0.2        lubridate_1.8.0     googledrive_2.0.0   assertthat_0.2.1   
[56] httr_1.4.4          rstudioapi_0.14     R6_2.5.1            globals_0.16.1      compiler_4.2.0     
andreweatherman commented 1 year ago

This error is reproducible on my Mac when running hoopR 1.8.0. Try updating to the development version and give it another go @dbaggot3. That fixes it on my end.

if (!requireNamespace('pacman', quietly = TRUE)){
  install.packages('pacman')
}
pacman::p_load_current_gh("sportsdataverse/hoopR", dependencies = TRUE, update = TRUE)
dbaggot3 commented 1 year ago

That fixes the issue on my end as well, thank you for this!!

saiemgilani commented 1 year ago

Man I'm struggling with this one. Something has changed

Nvm, still undefeated 💪