Add the script MakingThePolyref.R

Additionally a minor  change to MakingTheFarmref.R