R code for generating data: first pass

Signed-off-by: David <dti@berkeley.edu>