Learn R Programming

worldfootballR (version 0.6.2)

fb_team_goal_logs: Get team goal logs

Description

Returns the team's season goal logs

Usage

fb_team_goal_logs(team_urls, time_pause = 3, for_or_against = "for")

Value

returns a dataframe of the team's goals scored and conceded in the season

Arguments

team_urls

the URL(s) of the team(s) (can come from fb_teams_urls())

time_pause

the wait time (in seconds) between page loads

for_or_against

select whether to return data of goals "for" (the default), goals "against", or "both"

Examples

Run this code
if (FALSE) {
try({
# for single teams:
man_city_url <- "https://fbref.com/en/squads/b8fd03ef/Manchester-City-Stats"
fb_team_goal_logs(team_urls = man_city_url, for_or_against = "for")
})
}

Run the code above in your browser using DataLab