Free Access Week - Data Engineering + BI
Data Engineering and BI courses are free this week!
Free Access Week - Jun 2-8

fastR (version 0.10.3)

nfl2007: NFL 2007 season

Description

Results of National Football League games (2007 season, including playoffs)

Arguments

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

Run this code
# NOT RUN {
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)

# }

Run the code above in your browser using DataLab