01 library("lattice") 02 03 commits <- read.csv("perl-git-log.csv") 04 05 commits$year <- format( 06 as.POSIXlt( 07 commits$time, 08 origin="1970-01-01"), 09 "%Y" 10 ) 11 # Authors with more than 5000 12 # file commits 13 au=table(commits$author) 14 au = sort(subset( au, au > 5000 )) 15 16 files.by.auth.year = 17 table( commits$author, commits$year ) 18 files.by.auth.year = 19 as.data.frame( files.by.auth.year ) 20 names( files.by.auth.year ) = 21 c("author", "year", "files") 22 23 files.by.auth.year = subset( 24 files.by.auth.year, 25 files.by.auth.year$author %in% names(au) 26 ) 27 28 png(file="authors-by-year.png") 29 xyplot( files ~ year | author, 30 data = files.by.auth.year, 31 layout = c(1, 5), 32 scales = list(x = list(rot = 45)), 33 type = "l", 34 xlab = "Year", 35 ylab = "File Commits", 36 title = "Authors with > 5000 Commits" 37 )