Description Usage Format Source Examples
Award voting for managers awards
1 |
A data frame with 385 observations on the following 7 variables.
awardIDname of award votes were received for
yearIDYear
lgIDLeague; a factor with levels AL NL
playerIDManager (player) ID code
pointsWonNumber of points received
pointsMaxMaximum numner of points possible
votesFirstNumber of first place votes
Lahman, S. (2014) Lahman's Baseball Database, 1871-2013, 2014 version, http://baseball1.com/statistics/
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | # Voting for the BBWAA Manager of the Year award by year and league
require(plyr)
# Sort in decreasing order of points by year and league
MOYsort <- ddply(AwardsShareManagers, .(yearID, lgID), arrange, desc(pointsWon))
# Any unanimous winners?
subset(AwardsShareManagers, pointsWon == pointsMax)
# OK, how about highest proportion of possible points?
AwardsShareManagers[with(AwardsShareManagers, which.max(pointsWon/pointsMax)), ]
# Bobby Cox's MOY vote tallies
subset(AwardsShareManagers, playerID == "coxbo01")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.