Skip to content

Instantly share code, notes, and snippets.

@dgleich
Created April 17, 2009 07:17
Show Gist options
  • Save dgleich/96897 to your computer and use it in GitHub Desktop.
Save dgleich/96897 to your computer and use it in GitHub Desktop.
# 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment