get_colleagues.Rd
Get Common Team Mates For Named Players
get_colleagues(all_players, players)
Data.frame. Data fetched from
Transfermarkt with
get_players
.
Character vector. One or more player names for whom to return
common team mates from the all_players
data.frame. See details.
A data.frame with a row per player and season.
Pass one player name to the players
argument to fetch all of
their team mates in the dataset. Pass multiple players to return common
team mates and they seasons they played together.
if (FALSE) {
# Fetch player data from Transfermarkt
epl_players <- get_players(1992:2020, "England")
# Return all team mate data for one named player
get_colleagues(epl_players, "James Milner")
# Return data for all team mates in common for named players
get_colleagues(
epl_players,
c("Mark Viduka", "Kevin Phillips", "Nicky Butt")
)
}