Hi all, total noob to R so apols if I don't provide the right info first time, but I'm hoping someone can help me work out what I'm doing wrong when trying to pull some of their free data following the instructions here: https://statsbomb.com/wp-content/uploads/2021/11/Working-with-R.pdf
It looks like I have managed to install all the packages they recommend (tidyverse, devtools, ggplplot2, StatsBombR) as they are all showing with ticks next to them in my packages window, but I'm running into error messages when I'm trying to follow these instructions:
FreeCompetitions() - This shows you all the competitions that are available as free data
If you want to store the output of this (or any other functions) so you can pull it up at any time, instead of just having it in the R console, you can run something like the following:
Comp <- FreeCompetitions(). Then, anytime you run Comp (or whatever word you choose to store it under, you can go with anything), you will see the output of FreeCompetitions().
Matches <- FreeMatches(Comp) - This shows the available matches within the competitions chosen
StatsBombData <- StatsBombFreeEvents(MatchesDF = Matches, Parallel = T) - This pulls all the event data for the matches that are chosen.
When I run the FreeCompetitions() part it seems too pull a load of data in the console but then for the rest of it I'm getting this:
Comp <- FreeCompetitions()
[1] "Whilst we are keen to share data and facilitate research, we also urge you to be responsible with the data. Please credit StatsBomb as your data source when using the data and visit our website to obtain our logos for public use."
Matches <- FreeMatches(Comp)
[1] "Whilst we are keen to share data and facilitate research, we also urge you to be responsible with the data. Please credit StatsBomb as your data source when using the data and visit Media Pack | StatsBomb to obtain our logos for public use."
StatsBombData <- StatsBombFreeEvents(MatchesDF = Matches, Parallel = T)
[1] "Whilst we are keen to share data and facilitate research, we also urge you to be responsible with the data. Please credit StatsBomb as your data source when using the data and visit our website to obtain our logos for public use."
Error in if (MatchesDF == "ALL") { : the condition has length > 1
Any advice would be much appreciated!
thanks