Learn R Programming

VGAMdata (version 0.9-1)

oly12: 2012 Summer Olympics: Individuals Data

Description

Individual data for the Summer 2012 Olympic Games.

Usage

data(oly12)

Arguments

source

Downloaded from http://www.guardian.co.uk/sport/series/london-2012-olympics-data in 2013-03.

Details

This data set represents a very small modification of a .csv spreadsheet from the source below. Height has been converted to meters, and date of birth is of a "Date" class (see as.Date). A few non-ASCII characters have been replaced by some ASCII sequence (yet to be fixed up properly). Some competitors share the same name. Some errors in the data are likely to exist.

Examples

Run this code
data(oly12)
mtab <- with(oly12, table(Country, Gold))
(mtab <- head(sort(mtab[, "1"] + 2 * mtab[, "2"], decreasing = TRUE), 10))

barplot(mtab, col = "gold", cex.names = 0.8, names = abbreviate(names(mtab)),
        beside = TRUE, main = "2012 Summer Olympic Final Gold Medal Count",
        ylab = "Gold medal count", las = 1, sub = "Top 10 countries")

Run the code above in your browser using DataLab