# the last line is projected based on citations to the end of october # (almost certainly conservative) library(ggplot2) d <- read.csv("wikipedia_citations.txt",header=F) colnames(d) <- c("year", "citations") d <- d[1:(nrow(d)-1),] # print the total number of citations sum(d$citations) # generate and print a graph # p <- qplot(year, citations, data=d) + # geom_line(colour="blue") + geom_point(colour="blue") p <- ggplot(data=d) + aes(x=factor(year), y=citations) + geom_bar(stat="identity", fill=I("darkblue")) p <- p + scale_x_discrete("Year") + scale_y_continuous("Number of Papers") pdf("citations_by_year.pdf", width=7.5, height=5.3) print(p) dev.off()