Description Usage Format Examples
Results of National Football League games (2007 season, including playoffs)
1 |
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)
1 2 3 4 5 6 7 8 9 | data(nfl2007); 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)
table(nfl$dscore > nfl$line)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.