Rcode for generating synthatic data