R script for toy data