StatsBombR
StatsBombR copied to clipboard
Error with StatsBombData function
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.
Hi,
Please use free_allevents() in the place of StatsBombFreeEvents