R code

R code to make DD relationships