R scripts for Workshop