Results of National Football League games (2007 season, including playoffs)
Format
A data frame with 267 observations on the following 7 variables.
- date
date on which game was played
- visitor
visiting team
- visitorScore
score for visiting team
- home
home team
- homeScore
score for home team
- line
`betting line'
- totalLine
'over/under' line (for combined score of both teams)
Examples
data(NFL2007)
#> Warning: data set ‘NFL2007’ not found
NFL <- NFL2007
NFL$dscore <- NFL$homeScore - NFL$visitorScore
w <- which(NFL$dscore > 0)
NFL$winner <- NFL$visitor; NFL$winner[w] <- NFL$home[w]
NFL$loser <- NFL$home; NFL$loser[w] <- NFL$visitor[w]
# did the home team win?
NFL$homeTeamWon <- NFL$dscore > 0
table(NFL$homeTeamWon)
#>
#> FALSE TRUE
#> 115 152
table(NFL$dscore > NFL$line)
#>
#> FALSE TRUE
#> 135 132