StatsBombR icon indicating copy to clipboard operation
StatsBombR copied to clipboard

Error with StatsBombData function

Open abenedetto11 opened this issue 2 years ago • 1 comments

When running the following code: library(tidyverse) library(StatsBombR) Comp <- FreeCompetitions() %>% filter(competition_id==43) Matches <- FreeMatches(Comp) StatsBombData <- StatsBombFreeEvents(MatchesDF = Matches, Parallel = T) StatsBombData = allclean(StatsBombData)

I get this error message:

library(tidyverse) library(StatsBombR) Comp <- FreeCompetitions() %>% filter(competition_id==43) StatsBombData <- StatsBombFreeEvents(MatchesDF = Matches, Parallel = T) Error in if (MatchesDF == "ALL") { : the condition has length > 1 StatsBombData = allclean(StatsBombData) Error in dplyr::select(., -num_range("shot", 1:20)) : object 'StatsBombData' not found

Is there something wrong with the StatsBomb Free Data? I'm literally pasting the sample code in the "Working with R" guide.

abenedetto11 avatar Jun 07 '22 13:06 abenedetto11

Hi,

Please use free_allevents() in the place of StatsBombFreeEvents

EuanDewar avatar Aug 04 '22 10:08 EuanDewar