CommonGames: CommonGames

Description Usage Arguments Value Examples

View source: R/ProjectNFL.R

Description

These are a pair of functions that will take between 2-4 teams, see which opponents they have in common, and determine either the teams win-loss record against those teams (CommonGames) or the net points scored in those games (CommonGamesPts). If the total games played against common opponents between all evaluated teams is less than 4, the output will always be 0.

Usage

1
2
CommonGames(Team1, Team2, Team3 = NULL, Team4 = NULL, data,
  SimScores = NULL)

Arguments

Team1

the main team whose statistic is being evaluated by the function

Team2

a team that Team1 is being evaluated against

Team3

a team that Team1 is being evaluated against (default is NULL)

Team4

a team that Team1 is being evaluated against (default is NULL)

SimScores

the simulated scores, if a simulation was performed

Data

the data frame from which Scores are gathered (default is Week 17 WeeklyUpdate)

Value

CommonGames a win-loss record in games the other teams played as well. CommonGamesPts the total net points in games the other teams played as well.

Examples

1
2
3
4
5
6
CommonGames("Patriots","Dolphins")
CommonGames("Patriots","Dolphins","Bills")
CommonGames("Patriots","Dolphins","Bills","Jets")
CommonGamesPts("Patriots","Dolphins")
CommonGamesPts("Patriots","Dolphins","Bills")
CommonGamesPts("Patriots","Dolphins","Bills","Jets")

mstuart2097/STAT585Final documentation built on May 23, 2019, 8:16 a.m.