R script for comparing a series of files.