ffverse / ffsimulator

Simulate Fantasy Football Seasons
https://ffsimulator.ffverse.com
Other
15 stars 5 forks source link

`ff_simulate` throwing `position` related error for MFL connection #52

Closed wadefuller closed 10 months ago

wadefuller commented 1 year ago

Describe the bug There appears to be a bug with the position column when I run the ff_simulate function using an MFL connection.

Reprex 👇 some very basic source code here.

library(ffsimulator)
unh <- mfl_connect(2022, 65804)
mfl_sim <- ff_simulate(conn = unh, n_seasons = 100)

Expected behavior Expected the simulator to complete successfully. I've run this same code in the past without a hitch.

Session information Please copy the output of sessionInfo() into the box below.

R version 3.6.1 (2019-07-05)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: OS X  12.5

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

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] ffsimulator_1.0.0 ffscrapr_1.4.6    nflfastR_4.2.0    forcats_0.5.1     stringr_1.4.0     dplyr_1.0.7      
 [7] purrr_0.3.4       readr_2.0.1       tidyr_1.1.3       tibble_3.1.7      ggplot2_3.3.6     tidyverse_1.3.1  

loaded via a namespace (and not attached):
  [1] googledrive_2.0.0   colorspace_2.0-2    ellipsis_0.3.2      class_7.3-19        snakecase_0.11.0   
  [6] fs_1.5.0            rstudioapi_0.13     listenv_0.8.0       furrr_0.2.3         farver_2.1.0       
 [11] fastrmodels_1.0.2   prodlim_2019.11.13  fansi_1.0.3         lubridate_1.7.10    xml2_1.3.2         
 [16] codetools_0.2-18    splines_3.6.1       doParallel_1.0.16   cachem_1.0.6        knitr_1.34         
 [21] jsonlite_1.7.2      ratelimitr_0.4.1    pROC_1.18.0         broom_0.7.9         dbplyr_2.1.1       
 [26] yardstick_0.0.8     compiler_3.6.1      httr_1.4.2          backports_1.2.1     assertthat_0.2.1   
 [31] Matrix_1.3-4        fastmap_1.1.0       gargle_1.2.0        cli_3.3.0           htmltools_0.5.2    
 [36] tools_3.6.1         gtable_0.3.0        glue_1.6.2          rappdirs_0.3.3      Rcpp_1.0.8.3       
 [41] cellranger_1.1.0    vctrs_0.4.1         nlme_3.1-140        progressr_0.8.0     iterators_1.0.13   
 [46] parsnip_1.0.0       timeDate_3043.102   gower_0.2.2         xfun_0.25           globals_0.14.0     
 [51] rvest_1.0.1         lifecycle_1.0.1     googlesheets4_1.0.0 future_1.22.1       MASS_7.3-54        
 [56] scales_1.1.1        ipred_0.9-13        hms_1.1.1           parallel_3.6.1      yaml_2.2.1         
 [61] curl_4.3.2          memoise_2.0.0       rpart_4.1-15        stringi_1.7.4       foreach_1.5.1      
 [66] checkmate_2.0.0     hardhat_1.1.0       lava_1.6.10         gsisdecoder_0.0.1   rlang_1.0.2        
 [71] pkgconfig_2.0.3     evaluate_0.14       lattice_0.20-44     recipes_0.2.0       labeling_0.4.2     
 [76] tidyselect_1.1.2    parallelly_1.28.1   plyr_1.8.6          magrittr_2.0.3      R6_2.5.1           
 [81] generics_0.1.2      DBI_1.1.1           nflreadr_1.1.0      pillar_1.7.0        haven_2.4.3        
 [86] withr_2.5.0         mgcv_1.8-36         survival_3.2-13     nnet_7.3-16         future.apply_1.8.1 
 [91] janitor_2.1.0       modelr_0.1.8        crayon_1.5.1        xgboost_1.4.1.1     utf8_1.2.2         
 [96] tzdb_0.1.2          rmarkdown_2.11      grid_3.6.1          readxl_1.3.1        data.table_1.12.8  
[101] reprex_2.0.1        digest_0.6.29       openssl_1.4.5       munsell_0.5.0       askpass_1.1        

Screenshots

Additional context Error text below 👇

Error in `mutate_cols()`:
! Problem with `mutate()` column `position`.
ℹ `position = ifelse(.data$position %in% c("HB", "FB"), "RB", .data$position)`.
✖ Column `position` not found in `.data`.
Caused by error in `.data$position`:
! Column `position` not found in `.data`.
tanho63 commented 1 year ago

Can you upgrade the following packages to their development versions: nflreadr, ffsimulator, ffscrapr? You can use remotes::install_github(c("nflverse/nflreadr", "ffverse/ffsimulator", "ffverse/ffscrapr")) to do this

tanho63 commented 10 months ago

Closing for now, please feel free to open another issue if this is still problematic