Learn R Programming

worldfootballR (version 0.6.2)

fotmob_get_match_players: Get fotmob match player details by match id

Description

Returns match details from fotmob.com

Usage

fotmob_get_match_players(match_ids)

Value

returns a dataframe of match players

Arguments

match_ids

a vector of strings or numbers representing matches

Examples

Run this code
# \donttest{
try({
library(dplyr)
library(tidyr)
## single match
players <- fotmob_get_match_players(3610132)
salah_id <- "292462"
players %>%
  dplyr::filter(id == salah_id) %>%
  dplyr::select(player_id = id, stats) %>%
  tidyr::unnest(stats)

## multiple matches
fotmob_get_match_players(c(3609987, 3609979))
})
# }

Run the code above in your browser using DataLab