JaseZiv / worldfootballR

A wrapper for extracting world football (soccer) data from FBref, Transfermark, Understat
https://jaseziv.github.io/worldfootballR/
444 stars 60 forks source link

Error calling 'fb_big5_advanced_season_stats( )' method, with 'player' argument. #160

Closed mrigankmongia closed 1 year ago

mrigankmongia commented 1 year ago

RStudio console

> big5_player_shooting <- fb_big5_advanced_season_stats(season_end_year= c(2019:2021), stat_type= "shooting", team_or_player= "player")
Error: Column `Matches` not found in `.data`
Run `rlang::last_error()` to see where the error occurred.

> rlang::last_error()
<error/rlang_error_data_pronoun_not_found>
Column `Matches` not found in `.data`
Backtrace:
  1. worldfootballR::fb_big5_advanced_season_stats(...)
 28. rlang:::abort_data_pronoun(x)
Run `rlang::last_trace()` to see the full context.

> rlang::last_trace()
<error/rlang_error_data_pronoun_not_found>
Column `Matches` not found in `.data`
Backtrace:
     x
  1. +-worldfootballR::fb_big5_advanced_season_stats(...)
  2. | \-seasons_urls %>% purrr::map_df(get_each_big5_stats_type)
  3. +-purrr::map_df(., get_each_big5_stats_type)
  4. | \-purrr::map(.x, .f, ...)
  5. |   \-worldfootballR:::.f(.x[[i]], ...)
  6. |     \-stat_df %>% dplyr::select(-.data$Matches)
  7. +-dplyr::select(., -.data$Matches)
  8. +-dplyr:::select.data.frame(., -.data$Matches)
  9. | \-tidyselect::eval_select(expr(c(...)), .data)
 10. |   \-tidyselect:::eval_select_impl(...)
 11. |     +-tidyselect:::with_subscript_errors(...)
 12. |     | +-base::tryCatch(...)
 13. |     | | \-base:::tryCatchList(expr, classes, parentenv, handlers)
 14. |     | |   \-base:::tryCatchOne(expr, names, parentenv, handlers[[1L]])
 15. |     | |     \-base:::doTryCatch(return(expr), name, parentenv, handler)
 16. |     | \-tidyselect:::instrument_base_errors(expr)
 17. |     |   \-base::withCallingHandlers(...)
 18. |     \-tidyselect:::vars_select_eval(...)
 19. |       \-tidyselect:::walk_data_tree(expr, data_mask, context_mask)
 20. |         \-tidyselect:::eval_c(expr, data_mask, context_mask)
 21. |           \-tidyselect:::reduce_sels(node, data_mask, context_mask, init = init)
 22. |             \-tidyselect:::walk_data_tree(new, data_mask, context_mask)
 23. |               \-base::eval(expr, data_mask)
 24. |                 \-base::eval(expr, data_mask)
 25. |                   +-Matches
 26. |                   \-rlang:::`$.rlang_data_pronoun`(.data, Matches)
 27. |                     \-rlang:::data_pronoun_get(x, nm)
 28. \-rlang:::abort_data_pronoun(x)

> version
               _                           
platform       x86_64-w64-mingw32          
arch           x86_64                      
os             mingw32                     
system         x86_64, mingw32             
status                                     
major          4                           
minor          1.1                         
year           2021                        
month          08                          
day            10                          
svn rev        80725                       
language       R                           
version.string R version 4.1.1 (2021-08-10)
nickname       Kick Things       
JaseZiv commented 1 year ago

Please see this recently closed issue https://github.com/JaseZiv/worldfootballR/issues/158#issuecomment-1209957863.

Should be resolved now, but also be aware that there are load_ functions to get you the data you want https://jaseziv.github.io/worldfootballR/reference/load_fb_big5_advanced_season_stats.html

mrigankmongia commented 1 year ago

Thanks.

This doc needs updating - https://jaseziv.github.io/worldfootballR/articles/extract-fbref-data.html#the-big-5-euro-leagues

JaseZiv commented 1 year ago

Thanks.

This doc needs updating - https://jaseziv.github.io/worldfootballR/articles/extract-fbref-data.html#the-big-5-euro-leagues

Oh no sorry, I mean the load functions are in addition to the get/extract functions.

Is that what you meant?