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.team
a factor representing the home team
week
a numeric vector representing the week of the season
qtr
a numeric vector representing the quarter during the game
away.team
a factor representing the away team
offense
a factor representing the offensive team
defense
a factor representing defensive team
play.type
a factor with levels FG aborted
, FG blocked
, FG good
, and FG no
player
a factor representing player names
yards
a numeric vector
stadium.type
a 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.