market.shares <- read.table("http://ilari.scheinin.fidisk.fi/market-shares/market-shares.txt", header = TRUE, sep = "\t") market.shares$Month <- as.Date(paste(market.shares$Month, "-01", sep="")) jpeg("windows.jpg") plot(market.shares[,c("Month", "Windows")], main = "Windows", xlab = "Month", ylab = "Market Share", type = "l", las = 1, ylim = c(85, 100)) dev.off() jpeg("others.jpg") plot(market.shares[,c("Month", "Mac")], main = "Other Operating Systems", xlab = "Month", ylab = "Market Share", type = "l", las = 1, col = 2, ylim = c(0, 10)) lines(market.shares[c("Month", "Linux")], col = 3) lines(market.shares[c("Month", "Other.device")], col = 4) legend("topleft", inset = 0.01, legend = c("Mac", "Linux", "Others"), fill = 2:4) dev.off() jpeg("handhelds.jpg") plot(market.shares[,c("Month", "iPhone.iPod")], main = "Handheld Devices", xlab = "Month", ylab = "Market Share", type = "l", las = 1, col = 2, ylim = c(0, 1)) lines(market.shares[c("Month", "Windows.CE")], col = 1) lines(market.shares[c("Month", "Symbian")], col = 3) lines(market.shares[c("Month", "Android")], col = 4) lines(market.shares[c("Month", "BlackBerry")], col = 5) lines(market.shares[c("Month", "Other.handheld")], col = 6) legend("topleft", inset = 0.01, legend = c("Windows CE", "iPhone/iPod", "Symbian", "Android", "BlackBerry", "Others"), fill = 1:6) dev.off()