1 # the last line is projected based on citations to the end of october
2 # (almost certainly conservative)
5 d <- read.csv("wikipedia_citations.txt",header=F)
6 colnames(d) <- c("year", "citations")
10 # print the total number of citations
13 # generate and print a graph
14 # p <- qplot(year, citations, data=d) +
15 # geom_line(colour="blue") + geom_point(colour="blue")
17 p <- ggplot(data=d) + aes(x=factor(year), y=citations) + geom_bar(stat="identity", fill=I("darkblue"))
18 p <- p + scale_x_discrete("Year") + scale_y_continuous("Number of Papers")
20 pdf("citations_by_year.pdf", width=7.5, height=5.3)