Description Details Author(s) References Examples
A collection of data sets from several sources that may be useful for teaching, practice, or other purposes. Functions have also been included to assist in the retrieval of table data from websites or in visualizing sample data.
Package: | OIdata |
Type: | Package |
Version: | 1.0 |
Date: | 2011-11-03 |
License: | GPL-2 | GPL-3 |
LazyLoad: | yes |
Andrew P Bray and David M Diez
Maintainer: Andrew P Bray <andrew@openintro.org>
OpenIntro openintro.org
1 2 3 4 5 6 7 8 9 10 11 12 13 | data(military)
(tabFM <- table(military$branch, military$gender) /
matrix(rep(table(military$branch), 2), ncol = 2))
barplot(tabFM[,1], main = "proportion female")
data(piracy)
pipa <- piracy[piracy$chamber == "senate",]
keep <- pipa$money_pro > 0 & pipa$money_con > 0
for_pipa <- pipa$stance[keep] == "yes"
col <- ifelse(for_pipa, 2, 1)
pch <- ifelse(for_pipa, 20, 1)
plot(pipa$money_pro[keep], pipa$money_con[keep],
log="xy", col=col, pch=pch)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.