Description Usage Format Details Source Examples
This data set contains information on all 982 field goal attempts during the 2005 NFL season.
1 |
A data frame with 982 observations on the following 10 variables.
home.teama factor representing the home team
weeka numeric vector representing the week of the season
qtra numeric vector representing the quarter during the game
away.teama factor representing the away team
offensea factor representing the offensive team
defensea factor representing defensive team
play.typea factor with levels FG aborted, FG blocked, FG good, and FG no
playera factor representing player names
yardsa numeric vector
stadium.typea factor with levels Both, In, and Out
This data is provided courtesy of Aaron Schatz, Editor-in-Chief of Football Outsiders a web site about American Football.
This data set is used as an example in the book "R in a Nutshell" from O'Reilly Media.
http://www.footballoutsiders.com
1 2 3 4 5 6 7 8 9 10 11 12 13 | data(field.goals)
hist(field.goals$yards)
field.goals.forlr <- transform(field.goals,
good=as.factor(ifelse(play.type=="FG good","good","bad")))
field.goals.table <- table(field.goals.forlr$good,
field.goals.forlr$yards)
plot(colnames(field.goals.table),
field.goals.table["good",] /
(field.goals.table["bad",] +
field.goals.table["good",]),
xlab="Distance (Yards)",
ylab="Percent Good"
)
|
Loading required package: nutshell.bbdb
Loading required package: nutshell.audioscrobbler
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.