expatistan
Import peter's code and source() to string everything together.

You should run this with "Rscript main.R" or your platform's equivalent.