1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
library(lattice)
data <- read.csv("cities.csv",header=TRUE,row.names=1)
quartz()
stripplot(log(data$Population),groups=data$Outcome)
dev.off()
pdf(file="cities.pdf",height=8,width=8)
dotchart(log(data$Population), groups=data$Outcome,xlab="log Population")
dev.off()
pdf(file="cities-rank.pdf",height=8,width=8)
dotchart(-data$Rank, groups=data$Outcome,xlab="Rank Population")
dev.off()
pdf(file="cities-media.pdf",height=8,width=8)
dotchart(log(data$Population), groups=data$Media,xlab="log Population")
dev.off()
|