This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Read in the data without any processing | |
data <- read.table('http://www.dartmouth.edu/~chance/teaching_aids/data/birthday.txt',as.is=1) | |
data[,1] <- as.Date(data[,1],format='%m/%d/%y') | |
plot(data,xlab='Date',ylab='Live Births',main='Live Births by Date') | |
# save the plot | |
png('dob-distribution.png',width=700) | |
plot(data,xlab='Date',ylab='Live Births',main='Live Births by Date') | |
dev.off() # write it |
NewerOlder