Finish compile-analyses.R script