added a R script for testing/generating statistics