Install and load

# If you do not have it yet, download and install the package `iniestat` with
require(devtools)
devtools::install_github("rchailan/iniestat")

Then load the package in your environment with

library(iniestat)

Collect files

The very first function you want to use is iniestat::collect_f24().

# if you want all the available game of the season `season`
collect_f24(user="XX12345", passwd="mypasswd", season=2020)

# if you want the game of id `match_id`
collect_f24(user="XX12345", passwd="mypasswd", match_id="7890")
 
# if you want several games, use `matches_id` as
collect_f24(user="XX12345", passwd="mypasswd", matches_id=c("7890", "7891", "7177"))
 
# if you need to specify the root url you can set
collect_f24(user="XX12345", passwd="mypasswd", season=2020, root_url="https://my_new_root_url")

You may want to choose to collect F7 files associated with F24 for further use. This is available with

# if you want the game of id `match_id` and collect F7 files
collect_f24(user="XX12345", passwd="mypasswd", match_id="7890", store_f7 = TRUE)

This option works with all former configurations.

Read F24 file(s)

With the function iniestat::read_f24() you can then read the files just downloaded. It allows either to read one file or several files from a folder in one command only.

# To read one file from one match
my_events <- iniestat::read_f24(file_path = "my_f24.xml")

# To read several files from several match and stored in a directory
my_events_multi_games <- iniestat::read_f24(dir_path = "my_f24_data/")

The later function will read all files and concatenate the events into one tibble.

Read OPT file(s)

Still in dev.