added code and data

added R code and tidydata file