Learn R Programming

fbRanks (version 2.0)

resolve.team.names: Helper Function to Create Uniform Team Names in Score Data Frame

Description

Helper function not exported for users. Used primarily in rank.teams() function to construct the team predictor variable.

Usage

resolve.team.names(scores, team.resolver, team.data=NULL, use.team.select=TRUE)

Arguments

scores
A scores data frame.
team.resolver
A team name resolver. It gives a unique team name (display name) associated with the team name used in leagues and tournaments.
team.data
The team info data frame. Only needed if team select GUI is used.
use.team.select
Whether to call up the GUI team.name.select to select names missing from the team name resolver.

Value

Scores data frame with unique and uniform names for the teams in home.team and away.team columns.

Details

This replaces the team names in scores data frame with a unique name from the team name resolver (in name column). It is used primarily in the create.fbRanks.dataframes function. The scores element of a fbRanks object is the score data frame with the uniform names. The raw.scores element is the scores with the original names (as used in the match).